简体   繁体   English

git合并删除和修改的文件

[英]Git merge deleted and modified files

Here's the scenario: 这是场景:

I've forked a large open-source project that is updated on a daily basis. 我派出了一个大型开源项目,该项目每天都会更新。 There's a giant folder filled with different libraries and I only need a few, so when I forked it I deleted the libraries I knew I would never use to make my life easier. 有一个巨大的文件夹,里面装有不同的库,我只需要几个,所以当我分叉它时,我删除了那些我永远都不会用来使我的生活更轻松的库。 However, when I try to merge or rebase with the upstream source, I see tons of conflicts because the files I've deleted in my forked repo have been modified in the upstream. 但是,当我尝试与上游源进行合并或变基时,会看到大量冲突,因为在叉式存储库中删除的文件已在上游进行了修改。 What's the best way to continue to keep updated with the upstream without having conflicts with the deleted files? 继续与上游保持更新而不与已删除文件发生冲突的最佳方法是什么?

Thanks! 谢谢!

Don't delete them. 不要删除它们。 Just exclude them from your build. 只需将它们从构建中排除即可。 The only thing they should be doing in that case is taking up a small amount of disk space. 在这种情况下,他们唯一要做的就是占用少量磁盘空间。

That being said, if you truly don't need them, there shouldn't be an issue to deleting the updated versions as well. 话虽如此,如果您真的不需要它们,那么删除更新的版本也应该没有问题。

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

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