Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

egit lock fail eclipse

Tags:

java

git

eclipse

So at work we all share the same stash were we push and pull our branches and all that good git stuff. So i usually do my pull and push from egit in eclipse (I am not the only one most people here do it this way). but some of my branches have started giving me the [lock fail] "couldn't lock local tracking ref for update". But the thing is there are 75+ people doing it the same way and no one has seen this error. I have done some research and most of it says it is based off name conflicts for example Foo and foo. Egit would get confused on which one to pull because the only difference is a capital letter, but other people are having no issues. I don't know what is going on. Any help would be greatly appreciated.

like image 725
dabezt Avatar asked Apr 16 '18 14:04

dabezt


People also ask

What is Eclipse EGit?

Eclipse EGit™ EGit is an Eclipse Team provider for the Git version control system. Git is a distributed SCM, which means every developer has a full copy of all history of every revision of the code, making queries against the history very fast and versatile.


2 Answers

I could neither fetch nor push nor rebase, and got a "lock fail" error in eclipse too.

The solution I found was to open git bash, go to git folder, then do a git fetch. After this I was able to rebase and push with eclipse.

You can also check in your eclipse preferences/team/git/configuration that you have not set fetch.prune=true because it may cause this problem.

like image 98
RotS Avatar answered Oct 09 '22 12:10

RotS


git remote prune origin

solved it for me.

like image 20
Arash Kamangir Avatar answered Oct 09 '22 13:10

Arash Kamangir