我有这样一个场景:
简单的c项目,包含一些文件:fun1.cs、fun2.cs、fun3.cs。
文件包含空类。
我有两个分支:
-
删除fun3.cs文件的branchone
-
修改fun3.cs文件的分支。
我将brachone合并为master,现在我尝试branchtwo执行:
Git Rebase主机
我本来希望得到confict-fun3.cs已经被删除-但是没有冲突,fun3.cs中的更改被应用到fun1.cs(!)
Git Rebase和其他选项,如:
git rebase -i master
git rebase master -m
git rebase master -s recursive
git rebase master -s recursive -X rename-threshold=100
git rebase master -s recursive -Xpatience
全部检测确认。
控制台输出:
/GitCondingDojo/Example/MyProject (branchtwo)
$ git rebase master -m
First, rewinding head to replay your work on top of it...
CONFLICT (modify/delete): MyGitApp/Fun3.cs deleted in master and modified in HEAD~0. Version HEAD~0 of MyGitApp/Fun3.cs left in tree.
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
/GitCondingDojo/Example/MyProject (branchtwo|REBASE-m 1/1)
$ git rebase --abort
/GitCondingDojo/Example/MyProject (branchtwo)
$ git rebase master -s recursive
First, rewinding head to replay your work on top of it...
CONFLICT (modify/delete): MyGitApp/Fun3.cs deleted in master and modified in HEAD~0. Version HEAD~0 of MyGitApp/Fun3.cs left in tree.
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
/GitCondingDojo/Example/MyProject (branchtwo|REBASE-m 1/1)
$ git rebase --abort
/GitCondingDojo/Example/MyProject (branchtwo)
$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: added functionality to Fun3
Using index info to reconstruct a base tree...
A MyGitApp/Fun3.cs
Falling back to patching base and 3-way merge...
Auto-merging MyGitApp/Fun1.cs
这种行为背后的理由是什么?是否有一组“安全”或“推荐”的参数用于重新定位?