Created
August 9, 2017 15:33
-
-
Save marcusshepp/901880cb3d5c315a488d26136cdf8fd0 to your computer and use it in GitHub Desktop.
suppressing the possible error of a command
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
git log @{u}.. 2> /dev/null | |
# if git log fails, it will fail silently. | |
# 2> means redirecting the output of stderr. | |
# https://stackoverflow.com/questions/40714202/what-is-the-meaning-of-2-in-2-dev-null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment