Update your forked repository

1. Add source repository to remote list

1
2
3
4
5
/*
:name remote name
:git_url git's url
*/
git remote add :name :git_url

For example:

1
git remote add source https://github.com/xxx/xxx.git

you can use git remote -v to check for it’s added.

2. Fetch

1
git fetch :name

3. Pull

1
git pull --rebase :name :origin_branch::local_branch

For example:

1
git pull --rebase upstream master:master

4. Push

1
git push origin