更新 "Github Fork 之后的 Repo" 的方法
2016-04-23 19:05
316 查看
参考资料
http://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repositoryhttps://help.github.com/articles/syncing-a-fork/#platform-windows
https://www.zhihu.com/question/20171506
根据 上面 知乎用户 王徐阳 的答案 整理:
A 为 原始 Repo, B 为 A 的 Forked Repo先把 B clone 到本地
git clone B_REPOSITORY_URL
再 cd 到 本地B 的目录
把 A 作为一个 remote 加到 本地B 中 (一般命名为upstream)
git remote add upstream A_REPOSITORY_URL
pull 另一个 A 的 remote (upstream) 的相应分支 (比如 master)
git pull upstream master
最后 push 回 B
git push origin master
相关文章推荐
- RPC failed; result=22, HTTP code = 411
- 查看github pages文档的方式
- 使用BAE的基于Web.py的简单博客程序
- git更新已經刪除的文件
- 提取Git每次提交后Commit的文件
- GIT迁移服务器
- 分布式版本管理git入门指南使用资料汇总及文章推荐
- git终极指南:在实际开发中的应用
- 两分钟学会如何在github托管代码
- Nginx upstream的5种权重分配方式分享
- Git远程操作详解
- 25个 Git 进阶技巧(翻译)
- 详解版本控制利器Git,SVN的异同以及适用范围
- Android自定义View实现仿GitHub的提交活跃表格
- Ruby实现的删除已经合并的git分支脚本分享
- 在 Shell 提示符中显示 Git 分支名称的方法
- Git使用基础篇(一些常用命令和原理)
- git fork同步是什么意思?
- github配置使用指南