git err: ./git/index.lock: File exists.

홍요한·2021년 3월 24일
0
post-thumbnail

문제

깃을 잘 사용하고 있다가 문제가 생겼다.

fatal: Unable to create '리파지토리경로/.git/index.lock': File exists.
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:
remove the file manually to continue.

번역해보면, "다른 git 프로세스가이 저장소에서 실행중인 것 같습니다" 라고 나오는데,
어떤 git명령어도 사용되지 않아서 어떻게 해야할지 감을 못잡고 있던 중 해결법을 블로그를 통해 찾게 되었다.

해결방법

rm -f ./git/index.lock

위 명령어를 git bash에 입력해주었더니 Error가 풀렸다.

명령어

git rm : 삭제

참고링크 : https://webruden.tistory.com/529

0개의 댓글