Created
August 12, 2019 12:35
-
-
Save mortenholmgaard/b5a95754e68c68d6d9db19f578d7ab32 to your computer and use it in GitHub Desktop.
Checkout branch or create branch if it does not exist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
sh("git checkout stage", log: false) | |
puts "git checkout stage" | |
rescue => ex | |
sh("git checkout -b stage") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment