[git] .lock File exists 오류

sunny·2020년 12월 14일
post-thumbnail

문제상황

vscode에서 commit 하려고 하면 다음과 같은 오류 발생
push , commit 아무것도 안되는 상황..

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.

원인

lock 파일이 이미 존재하기 때문이다. git은 작업을 하기 전 .lock 파일을 만들어서 동시 작업이 일어나지 않게 막아놓는다.

해결

이전 작업 하다가 비정상종료가 발생해서 lock 파일이 지워지지 않았을 수 있다. 경로에서 .lock파일을 지우고 commit하니 정상적으로 실행되었다.

profile
blog 👉🏻 https://kimnamsun.github.io/

0개의 댓글