git - git如何合并与master冲突的分支
问题描述
I have a problem here: I have a branch feature in development and it posts a decent number of conflicts with master branch. I would like to make a pull request in the future to merge it with master.
Right now, I would hope to resolve some conflicts with master (not planning to merge yet). Will there be a recommended way for me to do that? I am thinking about creating a new branch with the up-to-date master and either cherry-pick or pull the feature branch and resolve conflict accordingly. Is that the right way? Also, in the future after more master pushes, should I redo the same process to resolve conflict? Thank you!
解决方案
你的意思是检查一个主分支(或一个与主分支相同的新分支)然后做变基功能?
不:
git checkout feature
git rebase master
理想情况下,我希望这棵树只是当前主节点之上的额外提交?
确切地说:它重写了feature
之上的分支master
,从而改变了feature
. 因此,请务必警告在同一分支上工作的同事。
并且,如此处所见,请务必激活git rerere
以避免每次将该分支重新基于master
.
推荐阅读
- powershell - 如何使用 power shell 脚本获取 IIS 站点物理路径和绑定详细信息
- javascript - 使用 dialogflow 将多个参数写入 Firestore 数据库
- python - python脚本中发布请求的空正文错误
- angular - 指令针对绑定组件的每个实例运行?
- excel - Excel:如何创建公式来汇总动态范围的单元格?
- java - 在 Java 中将字符串转换为小型大写伪字母表
- flash - 无法在电子应用程序中显示 Flash 内容
- git - 通过 GIT 管理 Step Functions、API Gateway、Lambda 并进行部署
- c# - 如何从 ip 范围中获取未使用的值并分配给 c# 中的字段?
- r - 如何将数字替换为R中的单词