less than 1 minute read

If you are working with a CI/CD pipeline (and you should be), sometimes you need to trigger the pipeline without making changes to the code. Instead of changing files adding empty lines at the end, creating unnecessary logs, we can create an empty commit:

git commit --allow-empty -m 'Empty commit'
git push

Via Daniel Genezini.

Usually recording a commit that has the exact same tree as its sole parent commit is a mistake, and the command prevents you from making such a commit. This option bypasses the safety, and is primarily for use by foreign SCM [Source Control Management] interface scripts.

Via the git docs.

Tags: ,

Categories:

Updated:

Leave a comment