Merge the incoming changes into the current branch和Rebase the current branch on top of the incoming

在用Idea来git更新项目时会出现如下提示:
在这里插入图片描述

Merge the incoming changes into the current branch:将传入的更改合并到当前分支中(常用)

Rebase the current branch on top of the incoming changes:在传入更改的基础上重新建立当前分支

  • 8
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 12
    评论
引用\[1\]:Rebase the current branch on top of the incoming changes: select this option to perform rebase during the update. This is equivalent to running git fetch and then git rebase, or git pull --rebase (all local commits will be put on top of the updated upstream head). 引用\[2\]:https://blog.csdn.net/qq_25881443/article/details/108489394 有空可以自己GitHub玩一下,借用 Merge是将公共分支最新版合并到自己的分支中,形成一个新的 commit 提交。 而Rebase则像公共分支又重新拉出来这个分支一样。 Merge(合并)是最常见的操作,Rebase(变基) 则用得很少。 但是项目中有种情况更适合用Rebase:自己开发分支一直在做,有多次commit(提交)。某天想把主线的修改合到自己的分支上,做一次集成,这种情况用Rebase就可以把commit都放在主线修改的头上。 引用\[3\]:再来说一下rebase, 这个命令会始终把你最新的修改放到最前头。比如你对主branch进行rebase以后, 你的所有修改就会在主branch当前所有的修改之前。你会更有信心保证你的代码运行畅通无阻。通过你自己的测试以后, 你就可以放心的把代码合并到主的branch里面了。 问题: rebase on top of the incoming changes是什么意思? 回答: rebase on top of the incoming changes是指将当前分支重新基于最新的变更进行变基的操作。这个操作相当于运行git fetch然后git rebase,或者git pull --rebase(所有本地提交将被放置在更新的上游头部)。通过rebase on top of the incoming changes,你可以将你的修改放在最新的变更之前,以确保代码的顺利运行。\[1\]\[3\] #### 引用[.reference_title] - *1* *3* [小白专场: Merge the incoming changes into the current branc和Rebase the current branch on top of the...](https://blog.csdn.net/qq_39463175/article/details/119636762)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [Rebase the current branch on top of incoming changes 与 Merge incoming changes into the current bran](https://blog.csdn.net/az44yao/article/details/116105051)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值