Skip CI in the next push commit

Amish Shabani
1 min readDec 28, 2023

The automation of software development processes has significantly evolved through CI/CD (Continuous Integration / Continuous Delivery) pipelines. GitLab CI is one of the platforms that offer this feature, allowing developers to automatically trigger pipelines on every commit. However, sometimes you want to prevent running your CI. You have different reasons, like:

  1. You are in the middle of feat/fix, and no need to run ci
  2. Your commit only includes fixing a typo, changing a word at docs, or …
  3. You are testing a feature that does not need a ci

This list can continue. But one thing is clear Don't run the ci.
In Gitlab ci, you can prevent running ci easily. There are 2 methods for that:

A. Custom Tag at Your message
Put [Skip ci] or [ci Skip] in your commit message.


git commit -m “Your fancy message [skip ci]” or git commit -m “Your fancy message [ci skip]

B. Using Git push options
In this scenario, you can skip ci execution for a specific commit push

git push origin <branch> --push-option=ci.skip or git push -o ci.skip 

At Method B, you can do a lot of cool things. I recommend reading its documentation.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response

Recommended from Medium

Lists

See more recommendations