Delete multiple remote branches in git

前端 未结 18 2498
轮回少年
轮回少年 2020-12-07 07:11

I have a team member who inadvertently pushed over 150 of his local branches to our central repo. Thankfully, they all have the same prefix. Using that prefix, is there a gi

18条回答
  •  甜味超标
    2020-12-07 07:53

    The same with grep: git branch -r | grep -Eo 'PREFIX/.*' | xargs -i git push origin :{}.

    branch -r shows origin/prefix/branchname. So it will take prefix/branchname.

提交回复
热议问题