简体   繁体   中英

How to merge changes from one branch to another after pushing to remote

I am new to git. I have a scenario were I have two branches master and testbranch as

Master <--M1 <--- M2 <-- M3

TestBranch...............M3 <-- T1 

New Master:

Master <--M1 <--- M2 <-- M3 <-- T1

I pushed the changes from the testbranch to the remote, now I want to merge my changes in testbranch to master branch. How can I do that?

I was able to resolve this by using cherry-picking.


$ git checkout master
$ git cherry-pick <commit-id>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM