首页 > 其他 > 详细

GitHub同步已经Fork的开源代码

时间:2015-05-19 00:46:22      阅读:157      评论:0      收藏:0      [点我收藏+]

最近Fork了一个很不错的C++实现的算法集(https://github.com/xtaci/algorithms),如何与开源代码同步的问题也就产生了,同步方式如下:


1 首先,在自己的GitHub上Fork此开源代码,然后Clone到本地

git clone https://github.com/lanbing510/algorithms.git

2 需要同步时,执行以下命令

#添加一个远程库连接到本地,命名为algorithms
git remote add algorithms https://github.com/xtaci/algorithms
#从远程分支拉取代码到本地  
git pull algorithms master  
#push到自己的库里  
git push

完成更新

GitHub同步已经Fork的开源代码

原文:http://blog.csdn.net/lanbing510/article/details/45832887

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!