我将另一个分支重新绑定到我的结帐分支上,并且在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
我是否需要提交上述已解决的合并冲突git commit
,还是可以使用git rebase --continue
直接进一步提升?
答案 0 :(得分:7)
这里有一些好的答案,但要回答这个问题。 否解决合并冲突后,您 需要提交
。通过git add <file>
将分辨率添加到git暂存区域后,git rebase --continue
将使用原始提交消息为您提交。
注意提交哈希值会改变!因此,当您将其合并到另一个已提交您在分支中更改的分支时,您将遇到将这些分支合并在一起的问题。
注意我在解决git commit
冲突后说你需要到git rebase
,但你可以如果你愿意的话。
如果更有意义的话,将文件从一个提交拆分成一系列单独的提交可能很有用。通常你只想解决冲突。如下所示:Break a previous commit into multiple commits。
答案 1 :(得分:4)
我在这里看到了
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
请做
git add br_boss_buha_faktura/valuelists/br_boss_buha_faktura_client.val
然后
git rebase --continue
答案 2 :(得分:0)
执行git rebase --continue
将重写您正在应用于您将其更改为的表单的当前提交。它将以test
分支中的相同名称提交更改。
注意你在提交时重新定位,可能是一个独立的HEAD状态!通常,在master
或staging
分支上进行一次折扣。
答案 3 :(得分:0)
如果您确实要进行更改,我相信您可以执行git rebase --skip
来跳过现在不存在的合并冲突。