I have forked a repo into my own github account and have successfully pulled it to my PC, however there is now a new branch on the original repo that I want as well but when
Once you have cloned your fork, you can on your local cloned repo add a new remote referencing the original repo (the one you have forked, and the one where a new branch of interest just appeared)
It is the triangular workflow:
What you do is:
cd /path/to/local/repo
git remote add upstream /url/of/original/repo
git fetch upstream
That last fetch will include the new branch (in the remotes/upstream
namespace)
From there, you can easily create a local branch starting from that upstream/newBranch
and push it to your fork (referenced by the remote named 'origin
')
git checkout -b newBranch upstream/newBranch
git push -u origin newBranch