git如何删除远端不存在的本地分支?

问题:远端分支删除后,如何删除之前拉取的本地分支?

答案:

  1. git fetch -p
  2. git remote show origin 可以查看remote地址,远程分支,还有本地分支与之相对应关系等信息。使用git remote prune origin删除所有远端已经删除本地仍然存在的分支
     

参考:

https://blog.csdn.net/LJFPHP/article/details/81741931

https://blog.csdn.net/qq_16885135/article/details/52777871

猜你喜欢

转载自www.cnblogs.com/shengulong/p/10398617.html