반응형
이름으로 스왑 파일을 찾았습니다.
내 분기를 원격 분기와 병합하려고 할 때 :
git merge feature/remote_branch
이 메시지를 받았습니다.
E325: ATTENTION
Found a swap file by the name ".git/.MERGE_MSG.swp"
owned by: xxxxxx dated: Mon Nov 12 23:17:40 2012
file name: ~xxxxxx/Desktop/My-ios-App/.git/MERGE_MSG
modified: YES
user name: xxxxxx host name: unknown-b8-8d-12-22-27-72.lan
process ID: 1639
While opening file ".git/MERGE_MSG"
dated: Tue Nov 13 14:06:48 2012
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 .git/MERGE_MSG"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".git/.MERGE_MSG.swp"
to avoid this message.
Swap file ".git/.MERGE_MSG.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
어떻게 처리할까요?
열려 git commit
있거나 git merge
진행 중이며 커밋 메시지를 편집하는 편집기가 아직 열려있는 것 같습니다.
두 가지 선택 :
- 세션을 찾아 끝내십시오 (권장).
.swp
파일을 삭제 합니다 (다른 git 세션이 사라진 것이 확실한 경우).
의견에 대한 설명 :
- 세션은 편집 세션입니다.
- 편집 세션 내
.swp
에서 명령을 입력하여 사용중인 내용을 볼 수:sw
있지만 일반적으로.swp
파일 접미사 (예 :)~/myfile.txt
가있는 사용중인 파일과 동일한 디렉토리에있는 숨겨진 파일입니다~/.myfile.txt.swp
.
수락 된 대답은 .swp 파일을 삭제하는 방법을 언급하지 않습니다.
프롬프트가 나타나면 "D"를 누르면 제거됩니다.
제 경우에는 D를 누른 후 최신 저장된 버전을 그대로두고 VIM을 잘못 종료했기 때문에 생성 된 .swp 를 삭제했습니다.
또한 가져 오려는 업스트림 분기에서 생성되지 않은 분기로 변경 사항을 가져 오려고 할 때이 오류가 발생했습니다.
예-이것은 night-version
업스트림과 일치하는 새 분기를 만듭니다.
git checkout upstream/night-version -b testnightversion
이것은 업스트림 testmaster
의 master
분기 와 일치하는 로컬 분기 를 만듭니다 .
git checkout upstream/master -b testmaster
이제 변경 사항 night-version
을 testmaster
분기로 가져 오려고 하면이 오류가 발생합니다.
git pull upstream night-version //while I'm in `master` cloned branch
적절한 분기로 이동하여 변경 사항을 가져 와서이 문제를 해결했습니다.
git checkout testnightversion
git pull upstream night-version // works fine.
.MERGE_MSG.swp is open in your git, you just need to delete this .swp file. In my case I used following command and it worked fine.
rm .MERGE_MSG.swp
참고URL : https://stackoverflow.com/questions/13361729/found-a-swap-file-by-the-name
반응형
'IT TIP' 카테고리의 다른 글
Visual Studio의 제목 표시 줄 텍스트를 변경하는 방법 (0) | 2020.12.01 |
---|---|
Android에서 확장 가능한 패널을 구현하는 방법은 무엇입니까? (0) | 2020.12.01 |
리소스로 시도하기위한 8 가지 지점-Jacoco 커버리지 가능? (0) | 2020.12.01 |
라 라벨 가드 란 무엇입니까? (0) | 2020.12.01 |
C #의 간단한 스레드 풀에 대한 코드 (0) | 2020.12.01 |