5

I am reading the Codeship documentation about skipping builds.

I am struggling to understand the correct format when doing a commit. I want to skip builds because I don't want to go over the 100 free monthly builds. I will run the tests myself instead.

Codeship says that I can --skip-ci or [skip ci] to the commit message. I have tried formats like:

git commit -m "My message" --skip-ci
git commit -m "My message" [skip ci]
git commit -m -skip-ci "My message"

None of these work. What is the right format?

atw
  • 5,428
  • 10
  • 39
  • 63

2 Answers2

13

The correct format is to add the method to the string itself:

git commit -m "My message --skip-ci"

or:

git commit -m "My message [skip ci]"
atw
  • 5,428
  • 10
  • 39
  • 63
1

I use a couple of handy aliases, extended from Oh-My-Zsh. My workflow has been improved by adding these to my system;

Create a WIP commit:

alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"'

And then create a WIP commit without running CI:

alias gwipskip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit -m "--wip-- --skip-ci"'

RossMc
  • 426
  • 2
  • 6