0
虽然重订一个分支到另一个(基础重建dev
分支到master
),如下如何覆盖补丁/提交的,而不是跳过它,而基础重建
git checkout dev
git rebase master
如果发生冲突,那么我们会看到以下选项
The copy of the patch that failed is found in: .git/rebase-apply/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 rebase --skip
),以消除所造成冲突,而基础重建的补丁。
但我想这里是覆盖从开发补丁,而忽略其处于主已经是补丁...像(git rebase --overwrite
)
的东西是否有这样的选项或任何其他方式做,所以?
是的,这是我正在寻找。我的意思是覆盖提交只不过是'git checkout - 他们的'。因为'git checkout --ours '类似于'git rebase --skip' –
newbie
好的,但记住如果你跳过整个补丁,它意味着_every_文件,而我的答案只是告诉你如何跳过_single_文件。 –
哦,是啊!所以更确切地说'git rebase --skip'类似于'git checkout --ours .' – newbie