How to merge git branches quickly and correctly

Suppose I have following branches

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


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

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


Answered by harryxiyou.

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


Yeah, it is more reasonable ;-)

Weiwei Jia

Weiwei Jia is a Ph.D. student in the Department of Computer Science at New Jersey Institute of Technology since 2016. His research interests are include storage systems, operating systems and computer systems.

Leave a Reply

Your email address will not be published. Required fields are marked *