Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Could not get advertised Ref for branch..." error when pulling in a git repository in Eclipse

Tags:

git

eclipse

When trying to pull (Team|Pull from the context menu) in a git repository in Eclipse I get Could not get advertised Ref for branch refs/heads/develop error. I guess that's because remote branch named develop was deleted in the meantime. Branch develop is currently checked out.

How to fix this?
Can I configure git and/or Eclipse so that I don't get this error next time some other remote branch gets deleted?

like image 390
Piotr Dobrogost Avatar asked Dec 25 '12 19:12

Piotr Dobrogost


1 Answers

I had the same error, and so I made sure my .git/config file had the following:

[branch "mybranch"]
    remote = origin
    merge = refs/heads/mybranch

That made EGit happy.

like image 112
Jake Toronto Avatar answered Nov 15 '22 04:11

Jake Toronto