Douglas Moura

Douglas Moura

Software Engineer

Douglas Moura

Douglas Moura

I write about TypeScript, React and Node.js.

How to push an empty commit on Git?

Published at:Published at:Updated at:

How to push an empty commit on Git?

Have you ever had to run a CI/CD pipeline that is triggered by a commit, when there is no code changes to be commited?

Well, just use the command below:

git commit --allow-empty -m "ci: trigger pipeline with an empty commit"

And then, just push the commit to the remote repository:

git push

That's it!

Leave a Reply

Loading comments...