git - Does Github have a way to synchronize your fork with cloned repo? -
does github offer way synchronize fork of github repo changes in source repo?
for instance fork repo, , rename master
upstream
want keep synchronized changes source repo, can github synchronize upstream
master
of source repo regularly?
no, github not provide it. instead can achieve locally.
first, create local repository, add own remote , retrieve it.
git init git remote add origin git@github.com:<username>/<repo>.git git pull origin master
next step, add remote branch repository points original repo forked from.
git remote add --track master <repo-name> git://github.com/<username>/<source-repo>.git
note master branch want track in forked repo. <repo-name>
you. if want verify, run git remote
, must see <repo-name>
, origin
output.
now, ready new changes original repo.
git fetch <repo-name>
a new branch called <repo-name>/master
created latest changes.
Comments
Post a Comment