You can fork the repo (even if you don't intend to contribute back), if only to keep a clear link with the original upstream repo.
From there, you can:
- clone your fork locally
add a remote referring to the upstream original repo
git remote add upstream https://github.com/User/repo
set the upstream branch to the remote 'upstream'.
That way, a simplegit pull
will always pull from the original repo (theupstream
one)git checkout master git branch -u upstream/master
set
push.default
tomatching
.
That way, agit push origin
will push all your local branches (updated from upstream) to your fork.git config push.default matching
The idea behind those settings is: pulling from upstream, but pushing to origin, meaning keep track of the new changes: you record in your fork the last SHA1 you pulled from upstream.
That way, you can from any workstation:
pull
fromorigin
(to update your local clone to the last SHA1 you memorized in your fork),- and
pull
fromupstream
in order to check/see any new commits from said original repo.