Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your local clone of Child, pull from Parent, adding it as a remote if you like:
The url of the parent could be the public github repo, or your local clone of it – the local clone will of course be faster. If you want to pull a branch other than the current HEAD of the parent repo, just add an argument (e.g.
git pull parent topic-branch). If this is a one-time thing, you can just skip adding the remote:git pull <parent-url> [branch].Pulling is a combination of fetching and merging, so once you’ve done that, you’ve got a new merge commit you’ll presumably want to push back to your public repo at some point.
The key point here, in case it’s not clear, is that pulling from the parent (upstream) repository is not different from pulling from your public clone of child, your current repository. Either way, you’re fetching from a repository with some common history, and merging that into your current branch. And of course, since you’re merging, a work tree is required – so this is something that must be done in your local repo. The repo hosted on github is essentially a way of publishing what you’ve done locally. All you can really do with it is push/pull, and browse what’s there.