• Register
1 vote

Problem :

I need solution for bellow GIT error
another git process seems to be running in this repository, e.g. an editor opened by 'git commit'.
6 5 3
6,930 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

Please use following command in case you are facing Another git process seems to be running in this repository e.g. an editor opened by 'git commit'. 

Please make sure all processes are terminated after that try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.

rm -f .git/index.lock

git reset 

and after reset command use 

git status, git add, and git commit -a or git commit -m "your message", git push origin master.

9 7 4
38,600 points
0 votes


Try deleting index.lock file in your .git directory.
rm -f .git/index.lock

Such problems generally occur when you execute two git commands simultaneously; maybe one from the command prompt and one from an IDE.

Use the below command in the root directory of the application. This will delete the index.lock file and release the active lock.

rm .git/index.lock

Deleting my commit message worked for me.


It is similar to above methods but in my case I had several of those


and was able to remove all at once by this way

find -name "*.lock" -exec xargs rm {} \;

If you are using CocoaPods and at some point botched an update or install (manually killed it or something), try

1) Removing the index.lock file (in .git/index.lock)

2) Remove your Podfile.lock file.

3) Do a new pod update

4) Try issuing the git command that was failing (in my case it was a git add .)

If you are windows user there will be error 'rm' is not recognized as an internal or external command. That's because rm is a Linux command. So in windows, you can use below to remove the index.lock file inside .git folder

del -f .git/index.lock
rm -f ./.git/index.lock

To fix:

rm -f .git/index.lock



10 6 4
31,120 points

Related questions

1 vote
1 answer 63 views
Problem : I have recently started to learn the GIT. I was working on my GIT and suddenly I started facing below error. &ldquo;Fatal: not a git repository (or any of the parent directories): .git&rdquo; As I am very new to GIT so I am unable to understand above error ... the error from past couple of days but unable to fix it. Is there anyone who can spare some time and guide me to fix above error?
asked Mar 30, 2020 morrisBson 3.2k points
1 vote
1 answer 91 views
Problem : I am unable to clone my Git repository, and getting below error: /c/Projects $ git clone http://stage.abc.com:10088/pqr http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or dir Please let me know any pointers to resolve my error.
asked Dec 30, 2019 alecxe 7.5k points
0 votes
1 answer 52 views
Problem : I am trying to use the TortoiseGit on my Windows. But when I want to Clone it from my context menu of the standard Windows Explorer then I face below error: Please make sure you have the correct access rights and the repository exists In more detail the complete snapshot of ... exit cleanly (exit code 128) (21450 ms @ 17.12.2019 10:36:58) What should I do to make my git work correctly ?
asked Dec 19, 2019 alecxe 7.5k points
0 votes
1 answer 235 views
Problem : I have recently started using Git. I am still learning about Git. I tried to do the pull from the remote repository. But now I am facing below error message: "Please enter a commit message to explain why this merge is necessary, especially if it merges an ... nothing is really happening for me. How can I fix the above error message. I am currently learning to use terminal on the OS X.
asked Mar 3, 2020 mphil 2.3k points
0 votes
2 answers 156 views
Problem : When ever I try to push to a shared git remote I get the following error remote: error: insufficient permission for adding an object to repository database ./objects
asked Nov 16, 2019 peterlaw 6.9k points
0 votes
2 answers 283 views
Problem : I have installed Git for Windows but when I try to use git command in Command Prompt I get the following message: 'git' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 134 views
Problem : How can I ignore the below error message on the Git pull? Your local changes to the following files would be overwritten by merge What if I just want to overwrite them? I Have already tried many things like git pull -f, but nothing really works for me.To be very clear, I just want to overwrite the specific changes and not the everything.
asked Jan 2, 2020 alecxe 7.5k points
0 votes
2 answers 160 views
Problem : I have the project with two branches as staging and beta. I try to develop on staging, and use my master branch to fix the bugs. git checkout master And do the stuff on it : git add fileToAdd git commit -m "bug fixed ... be overwritten by checkout: src/Pro/ConvocationBundle/Controller/DefaultController.php Please, commit your changes or stash them before you can switch branches. Aborting
asked Dec 18, 2019 alecxe 7.5k points