BuZ*_*dEE 6 git git-merge git-rebase git-branch
我将另一个分支重新绑定到我的结账分支上,并在rebase期间发生冲突.我解决了合并冲突.
$ git status
rebase in progress; onto 77c951b
You are currently rebasing branch 'test' on '77c951b'.
(all conflicts fixed: run "git rebase --continue")
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: br_boss_buha_faktura/forms/br_boss_buha_faktura_head_dtl.frm
modified: br_boss_buha_faktura/valuelists/br_boss_buha_faktura_client.val
new file: br_boss_buha_faktura/valuelists/br_boss_buha_faktura_client_name.val
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: br_boss_buha_faktura/valuelists/br_boss_buha_faktura_client.val
Run Code Online (Sandbox Code Playgroud)
我是否需要提交上述已解决的合并冲突,git commit还是可以直接进一步使用git rebase --continue?
Bre*_*dly 10
这里有一些好的答案,但要回答这个问题.不,您在解决合并冲突后不需要提交.
一旦通过git add <file>a git rebase --continue将分辨率添加到git临时区域,将使用原始提交消息为您提交.
注意提交哈希值会改变!因此,当您将此合并到另一个已提交您在分支中更改的分支时,您将遇到将这些分支合并在一起的问题.
注:我说你没有需要到git commit解析后git rebase的冲突,但你可以,如果你想.
如果更有意义的话,将文件从一个提交拆分为一系列单独的提交可能很有用.通常你只想解决冲突.如下所示:将先前的提交分解为多个提交.