Table of contentsClick link to navigate to the desired location
This content has been automatically translated from Ukrainian.
Making an empty git commit. Everyone has their own goals for this action. In my case - to trigger CI.
git commit --allow-empty -m "Your commit message"
In the working branch, you will most likely write the text in English, so:
git commit --allow-empty -m "Trigger Build"
Note the flag --allow-empty, it is what does the magic and allows you to make a commit without code changes.
And after that, you can push the code to remote:
git push origin main
main is the branch where the push will be executed. Also, read what origin means at the link if you don't know yet.
Why might an empty commit be needed?
Usually, it is needed to provoke (trigger) CI or some hook. That is, to run or test the launch of integrations, hooks, scripts, etc., without changes in the code. So you don't need to make any change in the code, for example, adding an empty line or some comment, to make a push.
This post doesn't have any additions from the author yet.