Is there a way to use git push-option in intellij?

Viewed 652

Is there a way in IntelliJ to specify the push-option parameter while doing a git push? I use GitLab CI and to skip the CI you could pass skip ci as a push-option parameter. As I don't see this feature in Intellij I have to put it in the commit message, but this means that for this exact commit I will never be able to run the CI process

2 Answers

If the options are always the same, you could set them via the push.pushOption in git config and it will work when pushing from the IDE

There is a feature request for --push-option support, please vote: https://youtrack.jetbrains.com/issue/IDEA-202210

It is still not possible to specify the options.

But as a workaround for the GitLab CI case, you can instruct it to skip CI by adding a "command" to the commit message of the latest commit you are pushing:

$ git commit -m "Some information

[skip ci]
"

$ git push   # CI will not be triggered

However, this causes a bug if you are also using GitLab ChatOps integration with Slack slash commands: https://gitlab.com/gitlab-org/gitlab/-/issues/328790

Related