github上,我如果fork了别人的项目, 进行了改动。。 原版更新了。。 我如何把他的原版合并到我自己的分支来?
淡淡烟草味2017-04-28 09:08:13
The method above is OK, but another method:
Use git commands in your repo:
Create a new remote upstream (the name can be arbitrary) git remote add upstream https://github.com/username/reponame.git
The link address is the source project address of your fork project
Then fetch the upstream code git fetch upstream
Finally, you can merge the code on upstream into your own branch git merge upstream/master
If it is not the master branch, change it according to your own situation. If your code does not conflict with the one on upstream, then everything will be fine~finished.
给我你的怀抱2017-04-28 09:08:13
You can rebase or merge, depending on your habits, the number of clones of your warehouse, etc. If you want to contribute back, you must also consider the other party's historical management policies.