How to make empty commit in Git?
Alex Pushkarev

Alex Pushkarev @dadyasasha

About: Currently, I am holding the position of Senior Software Engineer, but I prefer to consider myself a full-stack engineer. My passions are quality and efficiency. Agile fan and XP practitioner.

Joined:
May 20, 2022

How to make empty commit in Git?

Publish Date: Jun 8 '23
0 0

How to make an empty commit in Git?

Empty commits might seem like a strange and unnecessary thing, but they can actually be helpful.

For example, if you need to restart a pipeline, an empty commit can be just what you need to get it up and running again.

So how do you make an empty commit in Git? It's actually quite simple.

Just use the command

git commit --allow-empty -m 'your commit message here'

and voila!

You've made an empty commit. Now you can push it to remote, if necessary.

Comments 0 total

    Add comment