Source: Jason Krol
<username>
: your GitHub username<newrepo>
: a blank repo that you want to fill with your project<oldrepo>
: the repo that you want to fork
git clone https://github.com/<username>/<newrepo>.git
git remote add upstream https://github.com/<username>/<oldrepo>.git
git pull upstream master
git push -u origin master
If you want to pull in new changes from <newrepo>
, run:
git pull upstream master