When handling pull requests on GitHub, often I want to merge in commits from a branch with no changes. However, I would like to commit something just after the merge. I don’t want to git commit --amend because that would change the commit I’m bringing in, so tracking the change gets more complicated.
Is there a way to git commit nothing but a message? The reason is because I might want to mention something in the Pull Request — a URL pointing to a test case, or mention some other pull request so I can use a commit hook like Closes #123 in addition to the original pull request.
To commit an empty commit, use
git commit --allow-empty.