Skip to content

Instantly share code, notes, and snippets.

@marcusshepp
Created August 9, 2017 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusshepp/901880cb3d5c315a488d26136cdf8fd0 to your computer and use it in GitHub Desktop.
Save marcusshepp/901880cb3d5c315a488d26136cdf8fd0 to your computer and use it in GitHub Desktop.
suppressing the possible error of a command
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