git合并分支正确方法_如何快速正确地合并git分支

git合并分支正确方法

Suppose I have following branches

假设我有以下分支

harryxiyou@common_vm ~/forest/sqle/sqle/scripts $ git branch
* dev-harry
master
rc

harryxiyou @ common_vm〜/ forest / sqle / sqle / scripts $ git 分支
*开发

rc

After I did some changes on dev-harry branch, I wanted to merge dev-harry into rc branch.

在dev-harry分支上进行了一些更改之后,我想 dev-harry 合并到rc分支中。

1, git checkout rc
2, git merge dev-harry

1,git checkout rc
2,git merge dev-harry

References:
http://stackoverflow.com/questions/24147169/merge-two-remote-branches-in-git
https://www.atlassian.com/git/tutorials/using-branches
http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

参考文献:
http://stackoverflow.com/questions/24147169/merge-two-remote-branches-in-git
https://www.atlassian.com/git/tutorials/using-branches
http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

Answered by harryxiyou.
由harryxiyou回答。


I usually add --no-ff during git merge to force git to add a commit for the merge operation.

我通常在git merge期间添加--no-ff ,以强制git为合并操作添加提交



Yeah, it is more reasonable ;-)

是的,这更合理;-)

翻译自: https://www.systutorials.com/how-to-merge-git-branches-quickly-and-correctly/

git合并分支正确方法

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值