【发布时间】:2018-09-27 16:10:38
【问题描述】:
我正在尝试使用“git checkout feedback”和“git rebase master”将分支反馈与 master 合并。在执行 rebase 时,计算机电源关闭,中断了进程。现在 git bash 屏幕提示包含:(反馈 | REBASE 1/241)。 Git状态命令显示
$ git status
On branch feedback
Your branch is up-to-date with 'origin/feedback'.
You are currently rebasing branch 'feedback' on '7a20ac7'.
(all conflicts fixed: run "git rebase --continue")
nothing to commit, working tree clean
git rebase --continue 显示
$ git rebase --continue
Applying: Not clear why feedback doesn't run now
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 reflog 报告
4bae8c8 HEAD@{0}: commit (merge): Merge branch 'master' into feedback
eca14e3 HEAD@{1}: checkout: moving from 7a20ac7e86823915a4bce205a4baeeff7a7acb7a to feedback
7a20ac7 HEAD@{2}: rebase: checkout master
eca14e3 HEAD@{3}: checkout: moving from 7a20ac7e86823915a4bce205a4baeeff7a7acb7a to feedback
7a20ac7 HEAD@{4}: rebase: updating HEAD
eca14e3 HEAD@{5}: rebase: checkout feedback
7a20ac7 HEAD@{6}: rebase: checkout master
eca14e3 HEAD@{7}: commit: trying to scan a matrix <- last change on branch feedback
对反馈分支进行了大量修改。一位同事最近用反馈分支的变体更新了主分支。我需要做什么才能将我的反馈分支版本安全地合并到 master 中?
遵循评论中的建议
john@LAPTOP-CBKOSEPA MINGW64 ~/OneDrive/Documents/GitHub/crNn (feedback|REBASE 1/241)
$ git rebase --abort
john@LAPTOP-CBKOSEPA MINGW64 ~/OneDrive/Documents/GitHub/crNn (feedback)
$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: Not clear why feedback doesn't run now
Using index info to reconstruct a base tree...
M src/rnn/rnn.py
Falling back to patching base and 3-way merge...
error: inflate: data stream error (unknown compression method)
error: unable to unpack c8d57fe6a41234079ebe597c88f33e54b3306a14 header
error: inflate: data stream error (unknown compression method)
fatal: loose object c8d57fe6a41234079ebe597c88f33e54b3306a14 (stored in .git/objects/c8/d57fe6a41234079ebe597c88f33e54b3306a14) is corrupt
【问题讨论】:
-
尝试
git rebase --abort,然后再次运行rebase -
之前,我已经完成了以下顺序:“git rebase --abort”,“git checkout feedback”,“git rebase master”,并修复了识别的单个合并文件,并进行了提交/推(从原子内部)。上面的输出是电流。我输入了“git rebase --abort”,它返回到(反馈)提示。这应该跟“git rebase master”吗?我添加了上面的命令/输出。