简体   繁体   中英

Git - new commits in merged branch — how to merge these new commits?

I have a following issue:
I merged a branch test into master , after that my collegue pushed two commits into test .
I would like to again merge these two commits to master , but I wouldn't like to use cherry-pick .

What should I do?

There are two ways to do this.

Method 1:

Switch to master branch and pull test branch

git checkout master
git pull origin test (it performs merge test branch to master branch) 

Method 2:

  1. Switch to test branch and pull new commits

    git pull origin test

  2. Switch to master branch and merge test branch to master.

    git merge test

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