An Empty Commit Is A Useful Commit!


The motivation

Sometimes you need to perform a GIT commit without changing any file in the repository:

  • For triggering a new build
  • For testing the workflow (GIT hooks, builds, releases, etc.)


GIT commit has a special command switch for this purpose:


This switch performs a simple commit with no files changes but with a complete GIT object as of a regular commit.

For example, the following command:

git commit –allow-empty -m “Empty test commit”

creates the following object (screenshot from Atlassian SourceTree):



Simple and useful…


Yoram Michaeli -

Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at