Before you proceed, ensure that you have already forked a copy of shellfish and cloned your fork to your computer.
Change working directory to shellfish
% cd
% cd shellfish
List the current configured remote repository for your fork.
% git remote -v
origin https://github.com/YOUR_USERNAME/shellfish.git (fetch)
origin https://github.com/YOUR_USERNAME/shellfish.git (push)
Specify a new remote upstream repository that will be synced with the fork.
% git remote add upstream https://github.com/glyif/shellfish.git
Verify the new upstream repository you've specified for your fork.
% git remote -v
origin https://github.com/yeungegs/shellfish.git (fetch)
origin https://github.com/yeungegs/shellfish.git (push)
upstream https://github.com/glyif/shellfish.git (fetch)
upstream https://github.com/glyif/shellfish.git (push)
Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master.
% git fetch upstream
From https://github.com/glyif/shellfish
* [new branch] edit/readme-style -> upstream/edit/readme-style
* [new branch] master -> upstream/master
Check out your fork's local master branch.
% git checkout master
Switched to branch 'master'
Merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes.
% git merge upstream/master
Already up-to-date
If the original repository owners have made changes, this will fast forward and show all the changes that take place.