保持github主页仓库和本地仓库与源仓库同步
1:fork源仓库
2:clone到本地
git clone git@github.com:username/repositoryname.git
3:添加源仓库路径
git remote add upstream https://github.com/owername/pouch.git
4:源仓库路径设置
git remote set-url --push upstream no-pushing
5:获取源仓库的最新commit
git fetch upstream
6:将最新commit合并到本地
git merge upstream/master
7:将本地代码pull到自己的github
git pull
这时三个仓库就已经保持同步了。