Created
August 20, 2016 12:48
-
-
Save huangblue/3a217d0f14ad17a2687af04b16d359df to your computer and use it in GitHub Desktop.
当原仓库更新后,如何更新自己fork别人的项目
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/huangblue/codeparkshare 将fork的项目克隆到本地 | |
git remote add codeparkshare https://github.com/Yixiaohan/codeparkshare 添加远程仓库(fork的原仓库) | |
git commit 提交本地变更 | |
git remote update 更新原仓库 | |
git checkout master 检出本地分支 | |
git pull codeparkshare master 从原仓库的master分支摘取数据。 | |
git push 数据推送到github | |
上述命令成功执行。演习如何从原仓库更新fork仓库 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
感觉git remote add codeparkshare https://github.com/Yixiaohan/codeparkshare 这个命令,是给网址指的那个项目取个名字,大概取成别的也没有关系。