진행 중입니다. 커밋 할 수 없습니다. 진행 또는 중지 (중단) 방법은 무엇입니까?
내가 실행할 때 :
git status
나는 이것을 본다 :
rebase in progress; onto 9c168a5
You are currently rebasing branch 'master' on '9c168a5'.
(all conflicts fixed: run "git rebase --continue")
nothing to commit, working directory clean
내가 할 때 :
ls `git rev-parse --git-dir` | grep rebase || echo no rebase
내가 본다 : rebase-apply
나는 원점을 약속 할 수 없다.
git branch
쇼 :
* (no branch, rebasing master)
develop
master
막혔어요. 어떻게해야할지 모르겠어요? 리베이스하는 데 이만큼 오래 걸리나요? git rebase --continue
아무것도하지 않습니다. 나는 자식 상태에 아무것도 없습니다 .. 나는 단지 rebase를 기다리고 있습니다. 어떡해?
UDATE : 다음의 출력입니다. git rebase --continue
Applying: no message
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 prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
git add. 아무것도 없습니다.
Rebase는 백그라운드에서 발생하지 않습니다. "rebase in progress"는 리베이스를 시작했고 충돌로 인해 리베이스가 중단되었음을 의미합니다. rebase ( git rebase --continue
) 를 재개 하거나 중단 ( git rebase --abort
)해야합니다.
의 오류 메시지에서 git rebase --continue
알 수 있듯이 git에게 패치를 적용하여 빈 패치를 적용하도록 요청했습니다. 이는 패치가 이미 적용되었으며 git rebase --skip
.
저장소에 리베이스를 요청했습니다. 커밋 (SHA 9c168a5로 식별)을 수행 한 다음 git rebase master
또는 git pull --rebase master
.
분기 마스터를 해당 커밋으로 리베이스하고 있습니다. 을 통해 리베이스를 종료 할 수 있습니다 git rebase --abort
. 이렇게하면 리베이스를 시작하기 전의 상태로 돌아갑니다.
나는 최근에이 상태에 들어갔다. 리베이스 중에 충돌을 해결 한 후를 실행하는 대신 변경 사항을 커밋했습니다 git rebase --continue
. 그러면 git status
및 git rebase --continue
명령을 실행할 때 본 것과 동일한 메시지가 생성됩니다 . 을 실행 git rebase --abort
한 다음 rebase를 다시 실행하여 문제를 해결했습니다 . 리베이스를 건너 뛸 수도 있지만 어떤 상태가 나를 떠나게 될지 확신하지 못했습니다.
$ git rebase --continue
Applying: <commit message>
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 prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
$ git status
rebase in progress; onto 4df0775
You are currently rebasing branch '<local-branch-name>' on '4df0775'.
(all conflicts fixed: run "git rebase --continue")
nothing to commit, working directory clean
나는 '리베이스 상태'에 갇혔다.
On branch master
Your branch is up to date with 'origin/master'.
You are currently rebasing.
(all conflicts fixed: run "git rebase --continue")
nothing to commit, working tree clean
하지만 실행 git rebase --skip
얻었다 error: could not read '.git/rebase-apply/head-name': No such file or directory
.
러닝이 rm -fr ".git/rebase-apply"
도움이되었습니다.
참고 : 물론, 리베이스에 신경 쓰지 않거나 더 이상 원하지 않는 이전 리베이스에 갇힌 경우에만 수행하십시오.
1 단계 : 계속 진행
git rebase --continue
2 단계 : CONFLICTS 수정 후
git add .
1 단계 로 돌아가서 이제
no changes ..
실행 이라고 표시되면git rebase --skip
1 단계로 돌아가십시오.If you just want to quit rebase run
git rebase --abort
Once all changes are done run
git commit -m "rebase complete"
and you are done.
I setup my git
to autorebase on a git checkout
# in my ~/.gitconfig file
[branch]
autosetupmerge = always
autosetuprebase = always
Otherwise, it automatically merges when you switch between branches, which I think is the worst possible choice as the default.
However, this has a side effect, when I switch to a branch and then git cherry-pick <commit-id>
I end up in this weird state every single time it has a conflict.
I actually have to abort the rebase
, but first I fix the conflict, git add /path/to/file
the file (another very strange way to resolve the conflict in this case?!), then do a git commit -i /path/to/file
. Now I can abort the rebase
:
git checkout <other-branch>
git cherry-pick <commit-id>
...edit-conflict(s)...
git add path/to/file
git commit -i path/to/file
git rebase --abort
git commit .
git push --force origin <other-branch>
The second git commit .
seems to come from the abort. I'll fix my answer if I find out that I should abort the rebase
sooner.
The --force
on the push is required if you skip other commits and both branches are not smooth (both are missing commits from the other).
Another option to ABORT / SKIP / CONTINUE from IDE
VCS > Git > Abort Rebasing
'programing tip' 카테고리의 다른 글
프록시와 데코레이터 패턴의 차이점 (0) | 2020.08.13 |
---|---|
Map Reduce Programming의 감속기에서 셔플 링 및 정렬 단계의 목적은 무엇입니까? (0) | 2020.08.13 |
왜 float 값을 템플릿 매개 변수로 사용할 수 없습니까? (0) | 2020.08.13 |
잘못된 형식의 숫자 값이 있습니다. (0) | 2020.08.13 |
명령 줄에서 JAR 파일을 실행하고 클래스 경로를 지정합니다. (0) | 2020.08.13 |