How can I refresh remote Git branches?

Hi,

There is a new branch in the remote repository, but it does not appear in the branches pop-up. How can I refresh that list to show the new branch?

Thanks,
Josh
9 comments
Comment actions Permalink
Of course, I found the answer right after posting this question (I swear I looked around for an answer before asking!)

I had to use the "VCS > Git > Fetch" command
30
Comment actions Permalink

@Josh , 5 years late, but Thank You!

5
Comment actions Permalink

In future "VCS > Git > Fetch" command will save your work time.

I think that this command must to be included in all Git tutorials and used more than 10 times for better remembering.

1
Comment actions Permalink

Note that doing a command line git fetch is not sufficient. One must do the git fetch in the ide in order to trigger the ide to update it's list. 

[no longer banging head against wall.]

Ed Greenberg

3
Comment actions Permalink

Not gonna lie, this is DUMB.
JetBrains, can you please do this automagically when we run "git fetch --al" or similar from the terminal? Even if it has to be in the Rider terminal, I'd be ok with that.

3
Comment actions Permalink

> JetBrains, can you please do this automagically when we run "git fetch --al" or similar from the terminal?

This wouldn’t be my preferred solution. Isn’t it possible to just get the new branches with a simple Pull, like Tortoise GIT is (afaik) doing it?

-1
Comment actions Permalink

I actually have the other way around problem. I have remote branches that are already deleted in github, but intellij somehow still keeps them in the list of the remote branches, and they are not removed. VCS->Git->Fetch didn't help

1
Comment actions Permalink

Genrym, to prune remote branches that were deleted from the server, you need to run this from the command line:

git remote prune origin

It would be nice if IntelliJ did this pruning automatically when performing VCS->Git->Fetch, or at least provide a separate menu option for this under VCS->Git.

It would be even better if IntelliJ would just let you enable automatic Fetch/Prune every minute in the background - that way we wouldn't have to deal with this crap at all in most cases.

 

2
Comment actions Permalink

Thanks Grnch - this will help for the meantime

0

Please sign in to leave a comment.