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.
Top comments (0)