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

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 16:07   2409   0

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 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP