GCTT(Go Chinese Translation Team) sync.sh同步命令详解
Posted fudianheg
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GCTT(Go Chinese Translation Team) sync.sh同步命令详解相关的知识,希望对你有一定的参考价值。
git remote add upstream https://github.com/studygolang/GCTT
添加fork项目的远程仓库(只需操作一次)
此时使用
git remote -v
zuoguoyaodeMacBook-Pro:GCTT zuoguoyao$ git remote -v
origin https://github.com/zuoguoyao/GCTT.git (fetch)
origin https://github.com/zuoguoyao/GCTT.git (push)
upstream https://github.com/studygolang/GCTT.git (fetch)
upstream https://github.com/studygolang/GCTT.git (push)
git fetch upstream
获取上游改动
git checkout master
转到master分支
git rebase upstream/master
合并分支,结果等同于merge.git实现的机制不一样
参考下文
http://gitbook.liuhui998.com/4_2.html
git push -f origin master
强制(-f )覆盖远程 origin仓库的master分支
以上是关于GCTT(Go Chinese Translation Team) sync.sh同步命令详解的主要内容,如果未能解决你的问题,请参考以下文章