Reputation: 2001
Let's say a repository from which I clone (and only read-only for me) is:
[email protected]:secret_project/dev.git branch: dev
I forked project and URL:
[email protected]:secret_user/Dde.git
(Which I have full access to: read+write)
But someone updated [email protected]:secret_project/dev.git
from another forked version.
Let's say file changed on
[email protected]:secret_project/dev.git (test.txt)
content:
hi!
But my forked project has test.txt
file with content:
hi
So how do I update the forked project locally and in my repository?
Which commands should I use? And please make an example with my showed repositories...
Upvotes: 28
Views: 18522
Reputation: 1323973
You should add the remote address for the original repository 'upstream
' to your local repository (which is a clone of your Dde.git
fork):
git remote add upstream git://github.com/secret_project/dev.git # public read-only URL
That will allow you to pull 'upstream
' into your own branch (merging and resolving any merge conflict in test.txt
).
Then you will push your local branch to your Dde
GitHub repository.
See GitHub help page: "Working with remotes" for more details.
Upvotes: 24
Reputation: 3394
Just send out a pull request from your repository's GitHub page to your Parent repository. Then pull the changes in your local forked repo and commit and send a fresh pull request.
Upvotes: 0