NGitLab icon indicating copy to clipboard operation
NGitLab copied to clipboard

Empty Commit

Open noxe opened this issue 3 years ago • 2 comments

Hi, is it possible to create an empty commit (git commit --allow-empty) using this API Client?

thx

noxe avatar Jul 31 '22 08:07 noxe

Hi @noxe,

GitLab exposes this API to create commits which is exposed in NGitLab though ICommitClient.

I don't know if you can create empty commits, it would need some more testing.

jairbubbles avatar Aug 01 '22 08:08 jairbubbles

Hi - thx for your reply - yes i found this - but since it requires actions and file paths i was not sure it is possible since they seems to be mandatory...

noxe avatar Aug 02 '22 06:08 noxe

Hi - thx for your reply - yes i found this - but since it requires actions and file paths i was not sure it is possible since they seems to be mandatory...

Just confirmed that it is possible using ICommitClient.Create(CommitCreate commit). The only things mandatory are CommitCreate's Branch and CommitMessage.

louis-z avatar Jun 06 '24 18:06 louis-z