Unable to fetch a remote's branches, nor subsequently delete the remote

Eric May 18, 2016

As of a few days ago, I can't fetch a remote's branches anymore or rather, they do not display. Steps to reproduce:

  • add a new remote
  • remote shows up in the left sidebar
  • right-click and "fetch from <remote-name>"
  • branches do not display in sidebar
  • however, I do see them appear in the history view

Some similarly weird thing is going on if I then remove that remote, the branches are not removed from history view. Steps to reproduce:

  • in left sidebar, right-click on <remote-name> and select "remove <remote-name>"
  • remote disappears from sidebar
  • branches from remote are still visible in history view

If I go into my ".git/refs/remotes/<remote-name>" folder, I see all its branches still in there, like the History view shows. Clearly, they are not getting deleted. I can remove them manually from the Finder, which then properly reflects in the History view, but it should be working from the UI. And it used to.

 

At the time I was still on SourceTree v2.2.4 and thought that might have been a bug. Didn't remember when I updated it last. So I installed the update to 2.3 with the same issue still. I downgraded a couple versions to v2.2.1 to which I'm certain that it worked with before and I'm still seeing the same issue. Apparently, it's not directly version related. - The only thing I can remember recently doing is installing some npm-modules to that repo. I don't think that this would have any effect but who knows.

 

Has anyone run into this issue before or has a suggestion on how to resolve this?

3 answers

1 accepted

1 vote
Answer accepted
Eric May 18, 2016

I think I just resolved it. The steps I took:

  • quit SourceTree
  • removed all previously added remote folders through the Finder from both ".git/refs/remotes/" and ".git/logs/refs/remotes/" (kept only origin and upstream remotes)
  • relaunched SourceTree
  • added a remote again, fetched and the branches showed up
  • removed the remote and it removed all its branches as well
  • this now works on v2.3 as well

Still not sure what initially caused this but it seems to be resolved... for now. Will keep an eye on it.

0 votes
Eric May 18, 2016

@Seth Good question, just tried that and no, it's actually the same behavior. The remote gets properly removed but not its branches. Hmm...

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2016

Is the behavior any different if you use git commands to remove the remote?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events