NaGeL182
NaGeL182

Reputation: 904

Eclipse Egit Failed to commit

I got Eclipse for PHP developers 3.0.2 With Egit 2.2.0 installed, and I am on windows 7 I got my project and repository set up and linked. Yet i cant commit changes. this is the error i get:

Exception caught during execution of add command
   Exception caught during execution of add command

I got Git for windows installed and set that in the Git configuration. I also got my HOME variable set up with %USERPROFILE%

Also my project location is on a remote server that i mapped to Z:

This includes the git repo as well.

That remote location has Lubuntu 12.10 installed. It has git installed as well.

Upvotes: 9

Views: 5382

Answers (5)

Ian Finch
Ian Finch

Reputation: 36

I hit this issue on a Windows 11 machine. The fix was to remove the 'hidden' attribute from all files under the .git directory

Upvotes: 0

VINAY VKK
VINAY VKK

Reputation: 23

give this a try, go to your repository and execute below command !

chmod -R 777 .git 

Upvotes: 0

baraka
baraka

Reputation: 806

My 2 cents... My git workspace is mapped locally on the dropbox folder (i'm a bit paranoid and prefers double backup options). Sometimes there's a mismatch with the sync process and dropbox keeps the git .lock file. Since all i care about is my resources and not the git metadata - i've simply unchecked the .git folder from synching online.

Upvotes: 0

swiftBoy
swiftBoy

Reputation: 35783

Thanks to @NaGeL182.. I got it working now because Git locked

So I need to delete the .git/index.lock file

  1. On Mac just Hit below command On Terminal

rm -f ./.git/index.lock

on Windows

del .git\index.lock

Hope this will help.

Upvotes: 3

NaGeL182
NaGeL182

Reputation: 904

I found what was the problem. Git locked it self witha file in the ./git/index.lock

After i removed that everything worked fine.

Upvotes: 11

Related Questions