• Register
1 vote
289 views

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

Solution:

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.

rm .git/COMMIT_EDITMSG

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

.git/refs/heads/<branch_name>.lock

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

0 votes
1 answer 2 views
2 views
Problem: i don&rsquo;t understand this problem. please help? another git process seems to be running in this repository,
asked 6 days ago Rohit kr 16.2k points
0 votes
1 answer 35 views
35 views
Problem : git - Your branch is ahead of 'origin/master' by 1 commit
asked Feb 15 Shovo210 13.8k points
0 votes
1 answer 2 views
2 views
Problem: I am creating a Git repository and i get an error: fatal: 'origin' does not appear to be a git repository
asked Apr 2 ummesalma 25.2k points
0 votes
1 answer 2 views
2 views
Problem: can someone help for this problem? how to go back one commit in git
asked Mar 30 Rohit kr 16.2k points
0 votes
1 answer 4 views
4 views
Problem: Hi ! I am facing this task to do can some one help?
asked Mar 19 PkGuy 13.1k points
0 votes
1 answer 3 views
3 views
Problem: It showing the error when I try to clone or pull or push repositories from git hub.
asked Apr 3 Jack20 3k points
0 votes
1 answer 2 views
2 views
Problem: git revert one file to previous commit.
asked 4 days ago Dan phillip 4.8k points
0 votes
0 answers 3 views
3 views
Problem: Can anyone help me? If yes, then answer me please.
asked 5 days ago niyatiry 3.2k points
0 votes
1 answer 1 view
1 view
Problem: Why I got this problem:how to remove a commit from git?
asked 5 days ago ashik 12.9k points
0 votes
0 answers 2 views
2 views
Problem: If anyone know about this then please answer me, i am stuck in this problem and don't know how to sloved out, if anyone know then please answer me. Thank you in advance.
asked Apr 6 niyatiry 3.2k points