Cygwin Ctrl+Z
에서 vim
. 메시지 를 편집하고 있었습니다 git commit
.
이로 인해
$ git commit -a
[1]+ Stopped git commit -a
vi 세션이 아직 활성화되어 있는 것 같습니다.
$ ps -ef | grep vi
myname 37252 15784 pty0 16:54:26 /usr/bin/vi
세션 에 다시 연결하고 작업을 재개하려면 어떻게 해야 합니까 vi
?
답변1
내가 한 일은 다음과 같습니다. 더 쉬운 방법이 있다면 자유롭게 다른 답변을 게시해 주세요.
$ git commit
fatal: Unable to create '/cygdrive/c/projectDir/.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.
$ rm /cygdrive/c/Clients/Gulden/dev/Watch_Firmware/.git/index.lock
$ git commit
E325: ATTENTION
Found a swap file by the name "/cygdrive/c/projectDir/.git/.COMMIT_EDITMSG.swp"
owned by: ...
file name: /cygdrive/c/projectDir/.git/COMMIT_EDITMSG
modified: YES
user name: ...
process ID: 37252 (still running)
While opening file "/cygdrive/c/projectDir/.git/COMMIT_EDITMSG"
dated: Wed Feb 1 17:11:22 2017
NEWER than swap file!
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /cygdrive/c/projectDir/.git/COMMIT_EDITMSG"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/cygdrive/c/projectDir/.git/.COMMIT_EDITMSG.swp"
to avoid this message.
"/cygdrive/c/projectDir/.git/COMMIT_EDITMSG" 16 lines, 547 characters
Press ENTER or type command to continue
:recover
에서 하세요 vim
. 메시지를 완성하고 저장합니다. 그런 다음 이전에 캐시된 부분 메시지를 삭제합니다.
$ rm /cygdrive/c/projectDir/.git/.COMMIT_EDITMSG.swp