git delete remotes: remote refs do not exist

前端 未结 3 588
感情败类
感情败类 2021-01-29 23:41

In short;

  • How can I delete remote multiple merged remotes?

More background;

I have a git repo with tens of remotes which have been merge

3条回答
  •  粉色の甜心
    2021-01-30 00:19

    Are those branches removed from the remote (origin)? If yes, you can simply do

    git fetch --prune origin
    

    Otherwise they might return even after you delete them locally.

    Update: Looking at your command again, it looks like you're building it incorrectly. You probably want

    git push origin --delete myBranch-1234
    

    but instead you are doing something like

    git push origin --delete origin/myBranch-1234
    

提交回复
热议问题