diff --git a/dim b/dim index 73936cea486977117dda3dc1cdef2e5ddd474505..3639ada1854bfba881e22cb4106209e35c2c7c28 100755 --- a/dim +++ b/dim @@ -1215,6 +1215,10 @@ function dim_create_branch fi remote=$(repo_to_remote $repo) + if [[ $(git branch -r | grep "$remote/$branch") ]]; then + echoerr "$branch already exists on $remote" + return 1 + fi $DRY git branch $branch $start git push $DRY_RUN $remote +$branch --set-upstream