티스토리 뷰

fatal: Unable to create 'E:/workspace/source/.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 checkout 시에 에러가 발생하면 다른 프로세스에서 git 명령을 수행중인지 살펴보고 만약 해당하는 프로세스가 없다면  

아래와 같이 lock 파일을 삭제해주어야 한다.

E:\worksapce\source (test -> origin)
λ git checkout master
fatal: Unable to create 'E:/workspace/source/.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.

E:\worksapce\source (test -> origin)
λ cd .git\

E:\worksapce\source\.git (test -> origin)
λ dir
COMMIT_EDITMSG  HEAD       config       hooks/  index.lock  logs/           objects/     refs/
FETCH_HEAD      ORIG_HEAD  description  index   info/       ms-persist.xml  packed-refs

E:\worksapce\source\.git (test -> origin)
λ del index.lock

E:\worksapce\source\.git (test -> origin)
λ cd ..

E:\worksapce\source (test -> origin)
λ git checkout master
Switched to branch 'master'
Your branch is behind 'origin/master' by 1579 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

E:\worksapce\source (master -> origin)
λ



Comments
댓글쓰기 폼