1. Fork的代码库中添加上游代码库的remote源,其中upstream表示上游代码库名,可以任意:
git remote add upstream https://github.com/lj2007331/lnmp.git
  1. 将本地的修改提交 commit

  2. 在每次 Pull Request 前做如下操作,即可实现和上游版本库的同步。

git remote update upstream
git rebase upstream/{branch name}

需要注意的是在rebase操作之前,一定要将checkout{branch name}所指定的branch

  1. Push代码