Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't commit with sublime text git on Ubuntu 14.04

When I'm trying to commit my work from inside sublime it gives me the following message:

fatal: Unable to create 'my_project_path/.git/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

I checked that but the index.lock is not exists at all! and when I commit in terminal everything is good.

any ideas?

like image 985
Raeef Refai Avatar asked Sep 03 '14 05:09

Raeef Refai


2 Answers

Try this

rm -f my_project_path/.git/index.lock

Sometimes, there is inconsistencies preventing git to release the lock, you also, just in case, should run git consistence checks to make sure your local git repo is consistent:

git fsck
like image 160
dseminara Avatar answered Nov 15 '22 21:11

dseminara


I downgraded git from 2.1.0 to 1.9.1 and all good now.

like image 37
Raeef Refai Avatar answered Nov 15 '22 20:11

Raeef Refai