본문으로 바로가기

[Git] Another git process seems to be running in this repository, 에러

코드를 구현한 후 commit을 하려고 하는데 commit 명령어가 사용되지 않았다. commit뿐만이 아니라 checkout, pull 등 git 명령어가 모두 사용되지 않았다. 그리고 아래 에러 메시지가 표시되었다.

에러 메시지

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 폴더 안에 있는 index.lock 파일을 삭제해주었다. 폴더에 직접 들어가서 수동으로 삭제를 해도 되자만 간단하게 명령어를 이용하여 해결할 수도 있다. 명령어 : rm -f ./.git/index.lock

결론

주소찾기 구현의 경우 공휴일 찾기를 해보았으면 훨씬 쉽다는 것을 알 수 있을 것이다. 다음 게시글에서는 리팩토링을 하고 약간의 기능을 더 추가하여 마무리를 지어보려고 한다.

마지막

해당 내용은 틀릴 수도 있다는 것을 감안하여 봐주세요. 틀린 내용 및 오탈자 수정 요청 환영입니다.

반응형