Skip to content

Instantly share code, notes, and snippets.

@tennisonchan
Last active August 3, 2022 04:19
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tennisonchan/e00212e3ed5498060c50d390233a3e1f to your computer and use it in GitHub Desktop.
Save tennisonchan/e00212e3ed5498060c50d390233a3e1f to your computer and use it in GitHub Desktop.
Check if branch exists in #git
# if branch_name exists, it will return its hash
# if not, it will returns null
git rev-parse --verify --quiet branch_name
@iridiumcao
Copy link

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment