Prune TFS branches

298 views
Skip to first unread message

Patrick Westerhoff

unread,
Apr 29, 2015, 11:48:32 AM4/29/15
to git-t...@googlegroups.com
Hey all,

I was wondering if there was a way to automatically prune deleted TFS branches from the Git repository. In my case, I have previously initialized a branch that existed on the TFS but has been removed since.

So running `git tfs branch` will list branches that no longer exist on the TFS and also don’t appear when I use `git tfs branch -r` or `git tfs list-remote-branches`. As a result, when I use `git tfs fetch --all`, it will try to fetch from those no longer existing branches, resulting in a `error: remote TFS repository path not found` message at the bottom. While this does not affect the usage in any way, it of course is a bit odd.

Is there a way to prune remote branches, similar to the `git fetch --prune` option? To me, it seems that the only easy way to remove the remote branches is to remove them from the `.git/config`.

Thanks!
Patrick

Philippe Miossec

unread,
Apr 30, 2015, 3:07:05 AM4/30/15
to git-t...@googlegroups.com

No, indeed, there is no way to prune tfs remotes...
That's something that would be good to have...

Philippe Miossec

unread,
May 1, 2015, 9:07:10 AM5/1/15
to git-t...@googlegroups.com
There is no way to prune but there is a way to delete the remote: https://github.com/git-tfs/git-tfs/blob/master/doc/commands/branch.md#delete-a-remote-branch
Reply all
Reply to author
Forward
0 new messages