Created
September 9, 2016 21:10
-
-
Save gartenfeld/2f85a0cd4734fbd564cc4d4fae4eb2cd to your computer and use it in GitHub Desktop.
Shell Fallback with Error-Muting
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
# 2 represents stderr | |
# 2> redirects stderr (to /dev/null mutes error output) | |
# || runs the second command only if the first one fails | |
alias gcm='git checkout maybe 2> /dev/null || git checkout master' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment