If you have configured a GitLab CI/CD pipeline well then on each
push to the repository result in execution of the pipeline. Sometimes it is not desirable to launch the pipeline immediately on the push or you may want to execute the pipeline using a schedule, in such case you can pass additional push option to instruct GitLab to skip the pipeline execution. To do so, the command would be:
git push -o ci.skip
But if you are using any GUI client for
git then you will not be able to pass this additional argument to the push command. In that case, you can configure the
push.pushOption instead as:
git config --local --add push.pushOption ci.skip
* Make sure to remove this configuration when you no longer want to skip the pipeline on
push. To do so, use the
git config --local --unset push.pushOption
If you prefer git CLI over GUI then you can create alias for such case:
git config --local --add alias.skipPipeline "push -o ci.skip"
Now you have choice:
- to skip pipeline use command:
- normal push with pipeline execution:
I hope you may find this information useful. Feel free to leave your feedback/opinion in comments.