How to push to Git without running CI on GitLab CI, GitHub Actions, or Travis CI

Updated . Posted . Visible to the public. Repeats.

If a project ist configured to spawn CI runners for tests or deployment when pushing to the Repo, a habit of pushing WIP commits regularly may conflict with that.
Here are two solutions that allow you to keep pushing whenever you feel like it.

Special commit message

To skip a CI run, simply add [ci skip] or [skip ci] to your commit message. Example:

git commit -m "wip authentication [ci skip]"

Git push options (GitLab)

In addition to that, GitLab CI supports Git push options. Instead of changing your commit message, specify the ci.skip option when pushing. Example:

git commit -m "wip authentication"
git push -o ci.skip

Documentation

See also:

Profile picture of Arne Hartherz
Arne Hartherz
Last edit
Tobias Kraze
Keywords
continuous, integration
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2021-04-14 09:03)