How to push an empty commit on Git?
Published at:Published at:Updated at:
Tags: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!