SourceTree cleans up the invalid branches of Origin

In the process of using SourceTree, we often need to push the current branch to the remote warehouse, and delete the branch after it completes its mission. SourceTree tracks more and more remote branches, and many deleted branches are still there, even if they are pulled from the origin again, they cannot be cleaned up.

method one:

Execute the following command:

git remote show origin  #查看本地仓库追踪远程仓库的状态

git remote prune origin # 清除所有失效的远程分支或根据提示删除特定失效分支

Finally, get the remote branch again or restart SourceTree.

Method 2: Click Get directly, then check this option, and click OK.
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_39004843/article/details/108079887