简体   繁体   English

Git rebase-合并冲突时强制覆盖

[英]Git rebase - force overwrite on merge conflict

I am trying to do a git rebase to migrate data to a disconnected SVN clone branch. 我正在尝试做一个git rebase来将数据迁移到断开连接的SVN克隆分支。

Let's say I am trying this with the SoundManager2 repo from Github . 假设我正在使用GithubSoundManager2存储库进行尝试。

About the first 20 or so of the rebase actions will work fine. 大约前20个左右的rebase操作可以正常工作。 After that it will start hitting some conflicts. 之后,它将开始遇到一些冲突。 Most of them resolve automatically, but regardless it makes me stop and continue. 他们中的大多数人会自动解决,但无论它使我停下来还是继续。

In this case, I don't care what the conflict is. 在这种情况下,我不在乎冲突是什么。 I just want to overwrite any conflicting files with whatever the latest file is. 我只想用任何最新文件覆盖所有有冲突的文件。 I've tried to get different merge strategies work, but have had no success. 我试图使不同的合并策略起作用,但是没有成功。

Any ideas or thoughts? 有什么想法或想法吗? Thanks. 谢谢。

You will always get this issue. 您将永远得到这个问题。 Git can't assume anything when there's a conflict. 发生冲突时,Git无法承担任何责任。 Sounds like you want your changes to be on top of whatever is published to the svn repo. 听起来好像您希望所做的更改是在svn存储库中发布的所有内容之上。 I would use "rerere" to help you. 我会使用“ rerere”来帮助您。

Merging is often better when trying to incorporate latest changes often. 尝试经常合并最新更改时,合并通常会更好。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM