Hacker News new | ask | show | jobs
by lorlou 1830 days ago
Because a message is mandatory to be able to make a commit.
2 comments

Someone above mentioned:

git commit --amend --allow-empty

--allow-empty refers to the changeset [1]. You still need a message.

[1] To be precise, it allows to create a commit that has the same tree as the parent commit.

That can be fixed by using “EDITOR=true git commit --amend --allow-empty”
The default message is empty though, so not editing it will abort the commit.