Delete local Git branches after deleting them on the remote repo

前端 未结 12 1958
死守一世寂寞
死守一世寂寞 2020-11-30 16:26

I want to have my local and remote repositories always in sync in terms of branches.

After a Pull Request review on GitHub, I merge and remove my branch there (remot

12条回答
  •  自闭症患者
    2020-11-30 17:01

    In the event that you've just pushed and merged your branch to master, then do the following in git bash:

    git branch -d branch_name_to_delete
    

    If you're currently in that branch it will push you back to master. At this point do a pull with

    git pull
    

提交回复
热议问题