Git logo

Git: create empty commit to trigger an action

Written by

in

Sometimes it’s necessary to trigger an action for CI/CD, e.g. when you use GitLab. To do this without any changes on the code base, you can create an empty commit. For this, git has a command:

Plaintext
git commit --allow-empty -m "Trigger Build"

Comments

One response to “Git: create empty commit to trigger an action”

  1. That’s it! Thx 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *