Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisr "Remote branches" does not fetch remote branches created elsewhere #97

Open
pedrevans opened this issue Jun 20, 2016 · 3 comments

Comments

@pedrevans
Copy link

Click on "Remote branches" shows only remote branches that were pushed from one's own working directory, but not remote branches that were created elsewhere and pushed to the remote repository. It's impossible to get Revisr to show the new remote branches and there doesn't seem to be a workaround.

This is git behaviour. If you just do a git branch -r you don't see all the remote branches. You have to do a git fetch first to get local git to recognise that there are new branches on the remote repository. After that git branch -r works as expected. Revisr needs to do git fetch before git branch -r.

In the example below you can see that the remote branch update_plugins_20160620 doesn't show up before git fetch has been done.

[pete@cracked-it cracked-it]$ git branch -r
  origin/HEAD -> origin/master
  origin/crackedit-test
  origin/master
  origin/new_home_page_template
[pete@cracked-it cracked-it]$ git fetch
From bitbucket.org:cracked-it/cracked-it
   5996f53..520d4c6  master     -> origin/master
 * [new branch]      update_plugins_20160620 -> origin/update_plugins_20160620
[pete@cracked-it cracked-it]$ git branch -r
  origin/HEAD -> origin/master
  origin/crackedit-test
  origin/master
  origin/new_home_page_template
  origin/update_plugins_20160620
@mattgrshaw
Copy link
Member

Revisr actually runs git remote update --prune before running git branch -r.

According to the docs, git remote update --prune should be the equivalent of fetching from all remotes, or the same as running git fetch --all --prune, so it's interesting that this isn't working for you.

It might be worth using fetch instead if that resolves the issue. Can you confirm which version of Git this was happening on?

@pedrevans
Copy link
Author

Sorry about the late answer, I've been away on holiday and just saw this.

I am using git version 1.7.1.

@pedrevans
Copy link
Author

Wow that's pretty old. I'm on an AWS centOS server. In any case I will look into why it's running such an ancient git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants