Skip to content

Instantly share code, notes, and snippets.

@ceccode
Created October 19, 2017 10:08
Show Gist options
  • Select an option

  • Save ceccode/763dcdefe4e98917174f3d6c4c12dfdf to your computer and use it in GitHub Desktop.

Select an option

Save ceccode/763dcdefe4e98917174f3d6c4c12dfdf to your computer and use it in GitHub Desktop.

Revisions

  1. ceccode created this gist Oct 19, 2017.
    4 changes: 4 additions & 0 deletions branch-exists.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    exists=`git show-ref refs/heads/<branch-name>`
    if [ -n "$exists" ]; then
    echo 'branch exists!'
    fi