In Travis-ci I'm using this command.
git push origin HEAD:${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
This all works perfectly fine unless there is nothing to commit (response: Everything up-to-date
).
This is a perfectly fine response in my case, but it results in: exited with 1.
This is something I would like to avoid. Regardless if it actually is able to commit or if all is up to date I would like the response to be exit 0
.
How can I do this?
UPDATE:
As mentioned by @Mort in the comments, || true
works, but now I always have a positive exit status. I would like to only change the Git exit code for Everything up-to-date
.