+5

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

Geofrey van Hecke 7 years ago updated by Thomas Singer 2 years ago 5

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.

... aAnd now also if you have the repository initialized outside SmartGit and do the first commit.

There are tricks on ci/cd pipelines driven by messages on empty commits.