我的本地代码与主代码分岔了:
$ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 7 and 3 different commit(s) each, respectively.
#
nothing to commit (working directory clean)
我尝试了git pull --rebase但失败了:
$ git pull --rebase
First, rewinding head to replay your work on top of it...
Applying: * ...
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging ChangeLog
CONFLICT (content): Merge conflict in ChangeLog
Failed to merge in the changes.
Patch failed at 0001 * ...
我使用git rebase --abort回滚了,现在回到了起点。我的目标是:
1. 将我的7个补丁导出为人类可读的diff文件(类似于hg export)。 2. 让我的树成为原始主干的副本(类似于hg strip)。 3. 逐个手动重新应用我的7个补丁(类似于hg import)。
我知道git rebase --continue可以实现此操作。 我已经这样做了,并且它确实起作用了(经过几次手动合并和 git add)。 但是,我想手动完成这个过程, 因此,我想知道与上述hg命令相对应的git命令是什么。
谢谢。
PS。请不要告诉我使用带有git的ChangeLog文件很愚蠢。 即使是这样,也不由我决定。