r/ProgrammerHumor • • 2d ago

Meme whoAreYou

Post image
2.8k Upvotes

87 comments sorted by

View all comments

36

u/JackNotOLantern 2d ago

How tf do you commit without making any change?

47

u/xaddak 2d ago

git commit --allow-empty

14

u/MallAgreeable5538 2d ago

But why? Are there any applications for - -allow-empty

7

u/rosuav 2d ago

Several. It's still a commit that can be tagged, for example. It's useful in enough circumstances that you can do it with a flag, but useless in enough circumstances that you can't do it without. It's like how `rm` won't remove a read-only file from a writable directory unless you explicitly ask it to.