Cannot delete a remote branch created unintentionally

前端 未结 5 675
陌清茗
陌清茗 2020-12-25 12:54
$ git branch -a
* SocialAct
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/SocialAct
  remotes/origin/social

I want to delete

5条回答
  •  甜味超标
    2020-12-25 13:17

    The below command will delete the remote tracking branch but not the branch which exists on remote

    $ git branch -d -r origin/social
    Deleted remote branch origin/social (was 26f6f61).
    

    To delete remote branch:

    git push origin  :social
    

    This will automatically delete the remote tracking branch i.e remotes/origin/social.

提交回复
热议问题