Skip to content

Instantly share code, notes, and snippets.

@alecthegeek
Last active August 10, 2016 10:45
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 alecthegeek/129971 to your computer and use it in GitHub Desktop.
Save alecthegeek/129971 to your computer and use it in GitHub Desktop.
Are we in a git repo?
if b=`git rev-parse --git-dir 2>/dev/null`; then
echo git here at $b
else
echo no git
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment