본문 바로가기
DevOps/Git

[해결 방법] Another git process seems to be running in this repository

by HJ0216 2023. 1. 16.

발생 Error

Git Bash에서 다음 명령어를 입력할 경우,

git add .

 

Another git process seems to be running in this repository

Error 발생

 

 

Error 원인

같은 repository 안에서 다른 git process가 동작하고 있을 때 발생

(lock 파일이 생기는 걸 봐서는 java의 thread 구동 원리와 유사하다고 생각)

 

 

해결 방법

Git bash에서 아래와 같이 입력

rm -f ./.git/index.lock

rm: remove

-f(option): force

./: 현재 디렉토리(폴더)

.git/: .git 디렉토리

index.lock: index.lock 파일

➡️ 현재 디렉토리 하위의 .git 디렉토리 안의 index.lock 파일 강제 삭제

 

 

 

참고 자료

📑 [Git error] Another git process seems to be running in this repository

📑 Linux -rm 명령어 옵션 정리