How can I make git-svn get rid of remote branches that don't exist anymore?

前端 未结 2 1136
面向向阳花
面向向阳花 2021-02-02 18:13

Is there a handy way to get my local git repo to forget about remote branches that have been deleted? git svn fetch doesn\'t \"re-sync everything\" like I hoped it

2条回答
  •  灰色年华
    2021-02-02 18:36

    You can remove orphaned remote branches by executing the following commands:

    git branch -d -r my_branch
    rm -rf .git/svn/refs/remotes/my_branch
    

    To remove all orphaned branches at once rather than one at a time, see the answer here.

提交回复
热议问题