I have a fork of ERPNext from several months ago. Upstream has cleaned out a lot of branches since I forked, so my repo now has 184 branches, while upstream only has 41 branches.
Is there a way to sync the removal of those branches?
I have a fork of ERPNext from several months ago. Upstream has cleaned out a lot of branches since I forked, so my repo now has 184 branches, while upstream only has 41 branches.
Is there a way to sync the removal of those branches?
Sure, go into the repo on the command line and type in this command:
git remote prune origin
That will clean out non-existent branches on the remote. If you are nervous about running that command just add --dry-run to that command to see what branches would be removed like this:
git remote prune origin --dry-run
Just note that if you checked out any of those 184 locally on your machine, the command won’t affect those. The prune command cleans out remote references. So if you don’t need any of those checked out branches locally you need to run the standard delete command:
git branch -D [name of branch]