How to push empty Git commits

▪️

There are a few reasons you might want to push an empty Git commit. I mostly use one to trigger a CI/CD rebuild without changing any code.

Git prevents you from committing nothing so we need to use the --allow-empty flag.

~/itsamoreh.dev (main)> git commit --allow-empty -m "trigger rebuild"

That’s it!

Amor Kumar Avatar

👋🏽 Hi! I’m Amor – yes as in love!

I’m a creative front end engineer crafting user experiences with WordPress.
Currently, I’m working with enterprise clients at WebDevStudios.