synchronize fork project in github

2017/02/03/github-style/

When fork a project then want to follow project owner’s commit,
We need add another local repository.

Add remote repository center

1
2
git remote add liu https://github.com/liuweijw/fw-cloud-framework.git
git remote -v

the name liu is just a alias, separate with you project remote origin

Fetch the owner’s project update

1
2
git fetch liu
git branch -av

Merge branchs

1
2
git checkout master
git merge liu/master

if the merge process have conflict or failed, you may need to solve merging status
or just follow owner’s line reset -hard restore the branch and make the merge fast-forward.

Push

1
2
git push origin
#git push -u origin master -f

last push local synchronized project to you remote repository.
if you are an contributor new pull request may need to notify project owner.

https://www.jianshu.com/p/633ae5c491f5