• Register
search
Log In
1 vote
93 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.9k points

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.

36.1k 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

 

 

12.8k points

Related questions

0 votes
1 answer 130 views
130 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 mphil 2.3k points
1 vote
1 answer 32 views
32 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 morrisBson 3.2k points
1 vote
1 answer 50 views
50 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 37 views
37 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
2 answers 129 views
129 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