+3

Commit: allow to create an empty commit (git commit --allow-empty -m "...")

Geofrey van Hecke 3 years ago updated by Thomas Singer 3 years ago 3

This feature will expose an easy way through the UI to do the same as git commit --allow-empty -m "my comment".


There is a typical use case:

As a developer

When I add an empty commit to my checkout branch

And when I push it to my remote branch

Then it the Continuous Integration server triggers a new build.

Have you already tried to define an external tool?

I also use empty commits, currently I create one in every new repository (that helps as a workaround to difficulties with modifying root commit in git, and other minor problems).


I think it can be reasonable to add a new button to error message "There is nothing to commit".

SmartGit already creates an empty commit when initializing a new Git repository.