Last active
August 3, 2022 04:19
-
-
Save tennisonchan/e00212e3ed5498060c50d390233a3e1f to your computer and use it in GitHub Desktop.
Check if branch exists in #git
This file contains 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
# if branch_name exists, it will return its hash | |
# if not, it will returns null | |
git rev-parse --verify --quiet branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!