- To sync your repository, first you must have a pointer from the original repository. Let's call it
upstream
$ git remote -v # List all remote repository from your fork
$ git remote add upstream [https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git]
Let us say the original repository is https://github.com/google/material-design-lite
- Next, fetch the upstream branch
$ git fetch upstream
- Checkout to your master branch and sync your master to the original master repo
$ git checkout master
$ git merge upstream/master
- Checkout to your working branch and sync that with your new master
$ git checkout [working-branch]
$ git rebase master # NOTE: It may causes conflicts
¯\_(ツ)_/¯