简体   繁体   中英

How to merge master into branch submitted as pull request?

Scenario:

  • I sent a pull request up that is being reviewed. (1)
  • While my pull request was being reviewed, another pull request got merged into master. (2)
  • When this happened, the travis builds for my pull request started failing because of the changes in (2).
  • (2) has some new files that are not yet present in my pull request

Question How can I get the master and merge it into my branch and push the changes to github so that travis builds start again.

After the other pull request has been approved - which resulted in the changes to be merged into master - you now need to merge master back to you branch and retest your branch.

You can do it via:

  1. git fetch origin master
  2. git merge origin/master
  3. git push

or

  1. git checkout master
  2. git pull
  3. git checkout your_branch
  4. git merge master
  5. git push

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