Git remove unwanted branches remote tracking

This article addresses:  https://www.cnblogs.com/veinyin/p/10948399.html 

 

 

If the remote has a master, a, b, c branch

Git fetch later, it will track all remote branch, git Branch -a can see these four remote branch

If a remote branch is deleted, git Branch -a find is still on a remote tracking branch

Then if you want to clear out unwanted remote tracking change how to do it as follows

 

Remote-Prune Origin --dry Git RUN   // List but is still remotely track has been deleted useless remote branch, to be output from the above example where '* [deletes] Origin / A' 

Git Remote Prune Origin   // Clear the top command lists to remote branch track, output '* [deleted] origin / a'

 

 

 

END~~~≥ω≤

Guess you like

Origin www.cnblogs.com/veinyin/p/10948399.html