关于git远落后于远程master的时候,pull提示选择不同合并策略的分析

如果远落后于master分支,pull合并的时候,git会提示你选择合并策略,如下:
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
对应的三个方案:
  1. merge:最普遍的方式,拉下来解决冲突
  2. rebase:使用变基方式,不会产生无用 commit
  3. fast-forward:快进方式,只拉取没有冲突的


posted @   你看起来好像很美味  阅读(253)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示