Eclipse Egit Failed to commit
Asked Answered
F

5

9

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.

Fragonard answered 3/2, 2013 at 11:29 Comment(3)
I would advise against having the Git repository you are working with on a network share, it can cause various problems.Humfrey
but i dont know how to make the git repo and the working location in diferent locations...can you tell me how?Fragonard
I assume you push against a central repository that is different from the one on the network share, no? I meant that your local repository and working directory should be on a local disk. Separate locations for the .git and its associated working directory is not supported by Git, they are always a unit.Humfrey
F
11

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

After i removed that everything worked fine.

Fragonard answered 3/2, 2013 at 14:2 Comment(0)
P
3

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.

Prankster answered 7/1, 2014 at 6:54 Comment(0)
P
0

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.

Poseur answered 12/1, 2015 at 7:9 Comment(0)
T
0

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

chmod -R 777 .git 
Tripodic answered 16/9, 2020 at 21:21 Comment(1)
Before you paste this in even more locations, please take the time to read Is it acceptable to add a duplicate answer to several questions?.Algor
A
0

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

Adverse answered 11/8, 2022 at 4:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.