I created a fork of the git repository on BitBucket (call him fork_origin ). Now the upstream repository (let it be called upstream_origin ) has many branches, merged into it by the master and deleted. So run
git fetch --prune upstream_origin
removed many branches of remote/upstream_origin/ , but now the same branches still exist in the remote/fork_origin/ .
Is there a standard git command to handle this? I would like to stay away from complex bash scripts that massively delete remote repositories.
UPDATE:
As suggested, I tried using the prune remote command command:
git remote prune fork_origin
However, this had no effect. With further research, this only works for "obsolete" branches, but when I run:
git remote show fork_origin
this shows that all branches are still βtrackedβ. Therefore, it makes sense that the git remote prune command did not have anything obsolete to remove. Is there a way to force the remote repo ( fork_origin ) to update its branch statuses relative to upstream_origin ?
Peter Groves
source share