Reputation: 1147
I have basic skills in git + repository. How can I pull the updates from a official GitHub Repository to my laptop, merge my features there with the new updates and push all to my own repo? Is there a simple solution without always typing the urls of two different repos in parameters? I never want to push my changes to the official repo.
Thanks.
http://www.img-host.de/bild.php/52972,unbenanntHW3BS.png
Upvotes: 0
Views: 57
Reputation: 36
http://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes
Git supports managing multiple repos out-of-box. Fetch and push can both take the target repository as a parameter.
To add remote repositories execute:
git remote add [name of remote] https://url.to/remote
List remotes using:
git remote -v
Finally fetching and pushing from a specific repo:
git fetch [remote name]
git push [remote] [branch]
To fetch changes from one repo and push them to another pull changes from one remote, checkout source branch and push the changes to destination repo.
Upvotes: 1