2018-05-10 定期同步仓库

下载代码

$ git remote add upstream https://github.com/yeasy/docker_practice
  • Way 1. 传统更新自己仓库内容。
$ git add ***
$ git commit ***
$ git checkout master

$ git pull origin master
$ git push origin master
  • Way 2. 定期使用项目仓库内容更新自己仓库内容。
$ git add ***
$ git commit ***
$ git checkout master

// only need do once
$ git remote add upstream https://github.com/yeasy/docker_practice
// do every time before git push
$ git fetch upstream
$ git rebase upstream/master
$ git push origin master

你可能感兴趣的:(2018-05-10 定期同步仓库)