我有一个分支release-x.x.x
,我想合并到 master 中。但是,当我执行拉取请求时,它有数百个合并冲突。我认为这是由于我执行了 Swift 3 迁移。无论哪种方式,我都想在release-x.x.x
合并到master
. 我已经完成了checkout release-x.x.x
和git merge -s recursive -X ours master
。我正在反向执行此操作,因此我可以解决冲突release-x.x.x
,然后创建拉取请求master
并保留所有提交历史记录。
当我运行时git status
,这是一些输出:
added by us: Pods/FirebaseCrash/Frameworks/frameworks/FirebaseCrash.framework/FirebaseCrash
added by us: Pods/FirebaseCrash/Frameworks/frameworks/FirebaseCrash.framework/Headers/FIRCrashLog.h
added by us: Pods/FirebaseCrash/Frameworks/frameworks/FirebaseCrash.framework/Headers/FirebaseCrash.h
added by us: Pods/FirebaseCrash/Frameworks/frameworks/FirebaseCrash.framework/Modules/module.modulemap
deleted by them: Pods/FirebaseCrash/README.md
deleted by them: Pods/FirebaseCrash/batch-upload
deleted by them: Pods/FirebaseCrash/upload-sym
deleted by them: Pods/FirebaseCrash/upload-sym-util.bash
deleted by us: Pods/FirebaseInstanceID/CHANGELOG.md
added by us: Pods/Intercom/Intercom/Intercom.framework/Versions/A/Intercom
both added: MyProject/Base.lproj/Localizable.stringsdict
both deleted: MyProject/Localizable.stringsdict
both added: MyProject/en-HK.lproj/Localizable.stringsdict
我假设我想保留任何东西added by us
,both added
并保留任何标记的东西deleted by them
,所以我已经暂存了这些文件。我该如何处理deleted by us
和both deleted
?如果我尝试git rm Pods/FirebaseInstanceID/CHANGELOG.md
我得到错误:Pods/FirebaseInstanceID/CHANGELOG.md: needs merge
。我在正确的轨道上吗?