itsource

Gitrebase 병합 충돌을 계속할 수 없습니다.

mycopycode 2023. 6. 26. 21:19
반응형

Gitrebase 병합 충돌을 계속할 수 없습니다.

'master' 브랜치를 따라잡기 위해 'dev'를 재배치하려고 합니다.

$ git checkout dev 
$ git rebase master 
First, rewinding head to replay your work on top of it...
Applying: Corrected compilation problems that came from conversion from SVN.
Using index info to reconstruct a base tree...
M       src/com/....
<stdin>:125: trailing whitespace.
/**
<stdin>:126: trailing whitespace.
 *
<stdin>:127: trailing whitespace.
 */
<stdin>:128: trailing whitespace.
package com....
<stdin>:129: trailing whitespace.

warning: squelched 117 whitespace errors
warning: 122 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging src/com/....
CONFLICT (content): Merge conflict in src/com/...
Failed to merge in the changes.
Patch failed at 0001 Corrected compilation problems that came from conversion from SVN.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".

$ vi src/com/.....   { fixed the merge issue on one file } 
$ git add -A . 
$ git rebase --continue 
src/com/....: needs merge
You must edit all merge conflicts and then
mark them as resolved using git add
$ vi src/com....      { verified, no >>> or <<< left, no merge markers } 
$ git rebase --continue 
Applying: Corrected compilation problems that came from conversion from SVN.
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".

아이디어 있어요?

본 이 있는 이 몇 .rebase하나null이 경우)입니다.경우에는 null을 사용해야 할 있습니다.git rebase --skip.

그것은 꽤 쉽게 알 수 있습니다.네가 한다면.git status변경 사항이 표시되지 않아야 합니다.그렇다면 그냥 건너뜁니다.그렇지 않다면 다음의 복사본을 게시하십시오.git status더 많은 도움을 드릴 수 있습니다.

가 이 때중▁a▁doing▁is▁one다▁when때니▁issue입▁that를 할 때입니다.git commit▁a▁after시.git add따라서 다음 시퀀스는 사용자가 언급한 기본 재배치 오류를 생성합니다.

git add <file with conflict>
git commit -m "<some message>"  
git rebase --continue

반면 아래 시퀀스는 오류 없이 실행되고 기본 재배치를 계속합니다.

git add <file with conflict>
git rebase --continue

가능성이 있을 수 있습니다.git add -A" 상황이 는 그것에 매우 에 이 수 있습니다 "" 모두면유상참발니생다합황이한사하사옵용션대수있다틀니고미매습로때이문대그것기하릴숙에답은우해저는에을)참▁(▁with▁is▁may▁answer▁optionall▁"▁not▁a▁(▁the▁situation▁creating▁similar)"다,please모니▁be있"습▁correct수고.안전을 위해,git rebase --skip이 상황에서도 잘 작동하는 것 같습니다.

2는 "Git 2.0.2(2014년 7월)"라는했습니다.git rebase --skip막혀서 현재의 기본 재배치를 계속할 수 없을 것입니다.
브라이언 칼슨()bk2204의 커밋 95104c7 참조

rebase--merge고치다, 고치다, 고치다, 고치다--skip합니다.

한다면git rebase --merge충돌이 발생했습니다. 다음 커밋도 충돌하면 작동하지 않습니다.
msgnum파일이 새 패치 번호로 업데이트되지 않으므로 패치를 실제로 건너뛸 수 없으므로 피할 수 없는 루프가 발생합니다.

msgnumcall_call_의 첫 으로서의 파일입니다.
이렇게 하면 다음과 같은 문제도 방지할 수 있습니다.Already applied메시지가 나타납니다.
call_merge가.call_merge 파일의 값은 변경되지 않습니다. 이러한 상황에서는 msgnum 파일의 값이 변경되지 않기 때문입니다.

후 충이많긴이스후리이베시은간돌긴이▁(▁a▁after▁withlong)후시간)git status 에 서기로 있는 없었습니다.) 저는 제가 무대에 서기로 되어 있는 것이 무엇인지 알 수 없었습니다.저는 PphpStorm과 통합된 Git을 사용하고 있으며, 준비되지 않은 파일이 표시되지 않았습니다.

git add .해결되지 않았지만댓글은 전화하는 것을 추천했습니다.git diff-files --ignore-submodules그것은 제가 특별히 추가해야 하는 세 개의 파일을 보여주었고 그것은 효과가 있었습니다.

$ vi src/com....      { verified, no >>> or <<< left, no merge markers } 
$ git rebase --continue 

git add변경 내용...

저는 이것을 두 분기 모두에서 제거된 파일을 몇 개의 커밋으로 보았을 때 보았습니다.해야만 했어요git rm기본 재배치를 계속할 파일입니다.

저는 이것을 재현하려고 했지만 "계속할 수 없습니다"를 얻는 데 실패했습니다.손을 써보고 싶은 사람이 있다면, 제가 시도한 것은 다음과 같습니다.

mkdir t
cd t
git init
echo a > a.txt && echo b > b.txt && git add . && git commit -m "+a +b"

git checkout -b no-a
echo b1 > b.txt && git add b.txt && git commit -m "~b1"
git rm a.txt && echo b2 > b.txt && echo c1 > c.txt && git add . && git commit -m "-a ~b +c"

git checkout main
git rm a.txt && echo b0 > b.txt && echo c0 > c.txt && git add . && git commit -m "~b +c"
git log --oneline --graph --decorate --all

git checkout no-a
git status
git rebase main
ls
cat b.txt
git status

git checkout no-a b.txt
git commit -m "-a ~b"
git rebase --skip

git checkout no-a c.txt && git checkout main a.txt
git commit -m "~b +c"
git rebase --skip

언급URL : https://stackoverflow.com/questions/14410421/git-rebase-merge-conflict-cannot-continue

반응형