“Could not get advertised Ref for branch…” error when pulling in a git repository in 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?

Answers


As I mention in "How do you stop tracking a remote branch in git?", you can unset the associated remote tracking branch with:

git config --unset branch.develop.remote
git config --unset branch.develop.merge

It is certainly possible to edit the fetch/push specifications of a branch in EGit (see "Direct Fetch and Push Support "), but I find it so much quicker through the git CLI (command line interface).


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.


Need Your Help

Can I set the ErrorCheckingObjects in Excel per worksheet?

excel com automation ole

I am generating a CSV file which I then open in Excel via OLE Automation. Because of the format of the data, Excel shows many "Inconsistent Formula" warnings (a green icon in corner of each cell). ...

Filter values from database query

java mysql database forms

I have the following filter which i use to get values from database:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.