Languages
[Edit]
EN

Git - trigger build commit

8 points
Created by:
Tehya-Blanchard
444

In this short article we want to show how to push empty commit to remote with Git - called trigger commit too. That kind of operation is useful when we want to force project rebuilding on remote and we dont want to send any changes (useful for Jenkins, GitLab, etc. after pipeline failed because of non current project issue).

Quick solution:

git commit --allow-empty -m "Trigger build"
git push

When we don't want to run local tests, rebuilding etc. we can use:

git commit --no-verify --allow-empty -m "Trigger build"
git push --no-verify

 

Alternative titles

  1. Git - trig commit to remote
  2. Git - triggering commit to remote
  3. Git - push empty commit to remote to force project rebuild on remote
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Git

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

â€ïžđŸ’» 🙂

Join