Skip to content

Instantly share code, notes, and snippets.

@ceccode
Created October 19, 2017 10:08
Show Gist options
  • Save ceccode/763dcdefe4e98917174f3d6c4c12dfdf to your computer and use it in GitHub Desktop.
Save ceccode/763dcdefe4e98917174f3d6c4c12dfdf to your computer and use it in GitHub Desktop.
exists=`git show-ref refs/heads/<branch-name>`
if [ -n "$exists" ]; then
echo 'branch exists!'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment