krisjin / daylog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2019.2.19

krisjin opened this issue · comments

1. github fork出来的代码同步远程的代码更新

1.跟上游仓库同步代码之前,必须配置过 remote,指向上游仓库

git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git

2.打开命令行工具,切换当前工作路径至你的本地工程,从上游仓库获取到分支,及相关的提交信息,它们将被保存在本地的 upstream/master 分支
git fetch upstream

3.把 upstream/master 分支合并到本地的 master 分支,本地的 master 分支便跟上游仓库保持同步了,并且没有丢失你本地的修改
git merge upstream/master

4.将同步到本地库的代码push到github
git push origin master