Eclipse remote tracking branches are all missing suddenly

Viewed 1415

I used to have many branches in remote tracking.

After I set the GIT_TRACE_PACKET to be 1, change the GIT remote connection timeout to be 6000, import a new repository project down tried for so many times due to premature EOF error, at the end I successfully import the repository.

However, the remote tracking branches are all missing for all the projects including the existing project's remote tracking at the end.

I tried to set the GIT_TRACE_PACKET to be 0 or retry importing the project but it's still the same.
I doubt that maybe some kind of configuration changed and made the remote tracking branches to be missing.

ECLIPSE REMOTE TRACKING

3 Answers

Switch to command line and check you git config --get remote.origin.fetch refspec.

To fetch all branches, the refspec needs to be:

+refs/heads/*:refs/remotes/origin/*

If the refspec is:

+refs/heads/master:refs/remotes/origin/master

Then a fetch would only bring back the master branch.
This is typical of a git clone --branch develop --single-branch.

So change your fetch refspec, do a git fetch, and double-check the remote tracking branches with git branch -avv.

Finally, switch back to Eclipse and check the remote tracking section.

I found another alternative way to solve this problem. 1. Delete the file C:\Users*****\workspace.metadata folder. 2. Open the eclipse again. 3. Your eclipse configuration are all reset as origin.

Deleting .metadata will remove all the projects from Eclipse and will reset everything. So, best solution is to perform a pull (Right Click -> Team -> Pull) and then try rebasing. If this doesn't work, delete the eclipse project and local repository and the checkout the branch again. Then do a Pull and try rebasing.

Related