Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Another git process seems to be running and thus cant commit

Tags:

git

github

gitlab

I was committing my git process and thought that it would be okay if I ignore comments so I used this code

git commit filename

Bash was strange and thus i closed the console now when I use proper command

git commit -m"THIRD COMMIT" filename

It give the following response:

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 then try again. If it still fails, a git process may have crashed in this repository earlier:

what should I do?

like image 504
Ayush Mahajan Avatar asked Nov 06 '16 12:11

Ayush Mahajan


People also ask

How do you fix another git process seems to be running in this repository eg?

The Another git process seems to be running in this repository error is raised if two processes are running Git at the same time. To solve this error, remove your index. lock file in the . git/ directory .

How do I terminate a git process?

You can use the git reset --merge command. You can also use the git merge --abort command. As always, make sure you have no uncommitted changes before you start a merge.

Why is git add taking so long?

This is because the node_modules folder is not ignored and hence when we run git add . command git visit all your directory/files and sub directory/files which is not ignored in . gitignore hence it is taking so long time to process it as node_modules contains a large amount of files and folder.


1 Answers

I met this problem recently too.

rm -f ./.git/index.lock

try this commend in your git bash, then you can solve your problem.

like image 129
liuguangsen0409 Avatar answered Sep 28 '22 05:09

liuguangsen0409