Git 同步远程已删除分支的状态

Posted by Yun on Wed, May 10, 2023

背景

在 Git Remote 端删除了某些分支之后,在本地代码仓库运行 git branch -a 并不会同步这些状态。

解决

运行命令:

1git remote show origin

此时会提示本地的某些分支可以被 git remote prune 处理。

运行命令:

1git remote prune origin

完成。

参考链接

git远程删除分支后,本地git branch -a 依然能看到的解决办法。


版权声明:本文遵循 CC BY-SA 4.0 版权协议,转载请附上原文出处链接和本声明。

Copyright statement: This article follows the CC BY-SA 4.0 copyright agreement. For reprinting, please attach the original source link and this statement.