简体   繁体   中英

Github PR change compare from branch to master without many changes

I have a PR in Github compared against a branch A. The git branch was also built off of this branch A.

I want to update this comparison back to master and $ git pull origin master on the branch. However this causes thousands of merge conflicts even though the PR is less than 100 lines.

Other Options

  • I considered cherrypicking but then I lose the comments and history on the PR.
  • I could go by hand and manually merge all the conflicts.

Does anyone know the best way to do this? thx

You could do either of the following w/o losing history

  • Rebase your feature branch with master
 git rebase origin/master 
  • Merge master into your own branch

git merge origin/master

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