Say there is a project: A.
I made a fork: B.
I made changes to the fork (B) and made a pull request.
By that time main project (A) changed.
I need to pull A (main project) to my PC, merge it with B (fork).
Question is -
How do I pull the main project (A) into my PC?
I do understand that somehow it has to be a new branch (say main/master) that points to A.
But not very clear how to do it.
You'll want to add the original repository as a new remote repository. Then you can fetch from this remote and merge your new local copy onto your changes.
$ git remote add <name> <source>
$ git fetch <name>
$ git merge <name>/<branch>
# name = remote's nickname (i.e. upstream)
# source = remote's path (i.e. https://github.com/path/repo.git)
# branch = remote's branch name (i.e. 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.