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
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合并分支正确方法