Empty GIT commit

Empty commits in git make sense is some scenarios, you might use them to trigger workflows, builds, test commit hooks etc…

To create an empty commit, simply use --allow-empty flag, like this:

1
git commit --allow-empty -m "Trigger CI build"

Example use from my experience: automated server deploy fails because of server misconfiguration, fixing it produces no change in repository. CI might have a button to trigger rebuild manually, but empty commit is often simpler and quicker, and more importantly, consistent across environments.