git如何merge github forked repository里的代码更新?(转)
参考内容:git如何merge github forked repository里的代码更新?
[refer to ]http://www.haojii.com/2011/08/how-to-git-merge-from-forked-repository/]
问题是这样的,github里有个项目ruby-gmail,我需要从fork自同一个项目的另一个repository拿一些Bug Fix的代码
link1:https://github.com/dcparker/ruby-gmail (原作者dcparker的repository)
link2:https://github.com/jihao/ruby-gmail (我从link1 fork的repository)
link3:https://github.com/geoffyoungs/ruby-gmail (geoffyoungs 从link1 fork的repository,然后他有些Bug修改,但是没被merge回原作者的link1的repository)
也就我git clone repository到本地后,发现link3有我想要的代码,我要把link3上的改动merge到我的repository上,避免我花精力改相同的bug
git如何merge github forked repository里的更新?
具体做法是下面三步,以前没用git这么搞过,知道之后其实蛮简单1. >git remote add geoffyoungs http://github.com/geoffyoungs/ruby-gmail.git
2. >git fetch geoffyoungs
3. >git merge geoffyoungs/master
本地的repository看上去是这样的:>git remote -v
geoffyoungs http://github.com/geoffyoungs/ruby-gmail.git (fetch)
geoffyoungs http://github.com/geoffyoungs/ruby-gmail.git (push)
origin http://jihao@github.com/jihao/ruby-gmail.git (fetch)
origin http://jihao@github.com/jihao/ruby-gmail.git (push)
>git branch -a
* master
remotes/geoffyoungs/gh-pages
remotes/geoffyoungs/master
remotes/origin/HEAD -> origin/master
remotes/origin/adimircolen-master
remotes/origin/gh-pages
remotes/origin/master
git如何merge github forked repository里的代码更新?(转)的更多相关文章
- git如何merge github forked repository里的代码更新
git如何merge github forked repository里的代码更新? 问题是这样的,github里有个项目ruby-gmail,我需要从fork自同一个项目的另一个repository ...
- How do I update a GitHub forked repository?
I recently forked a project and applied several fixes. I then created a pull request which was then ...
- windows环境下使用git客户端、github和tortoisegit管理项目代码
一.为什么 为什么不用svn? svn是一个优秀的代码和版本管理工具,使用svn只需要搭建好svn中央仓库,配置本地svn客户端即可,自从google code关闭服务之后,互联网上已经没有非常好的公 ...
- github fork项目后,代码更新
协助约定 每个人都可以fork一份自己的repo,所有的修改都在自己私有的repo上进行:修改完成,测试通过后通过给主repo发pull request请求合并:主repo(Johnqing/n.js ...
- Git:从github上克隆、修改和更新项目
一.在本地新建一个文件夹,作为本地仓库,如“BigProjet”.在该文件夹打开git bash,进入到该文件夹目录下 二.将本地仓库初始化 $ git init 三.将项目从github或者服务器上 ...
- Git工具和GitHub的使用
一.Git工具的安装 1)centos系统下安装 1.1)查看环境 [root@gitlab ~]# rpm -qa centos-release centos-release--4.1708.el7 ...
- 利用git工具命令简单的从github上拷贝和上传代码
第一:从github上拷贝项目到本地 1.在github上建立一个项目名为:MygitTest 2.在我们本地电脑上把这个项目拷贝下来:直接选择一个文件夹,右键选择git Bash here 直接 ...
- git上了github又要上码云。
<h1>关联远程仓库:github为例</h1> 1.首先在用户目录下找到.ssh 2.如果.ssh文件夹里没有id_rsa和id_rsa.pub文件,或者也没有.ssh文件夹 ...
- git版本管理与github
1.下载并安装好git 里面有几个.exe的文件,需要用到的就是git-bash.exe 2.把git和github连接 1.打开github网站,点击最右上角的图标,点击setti ...
随机推荐
- RequestMethod用法小结和注意事项
本文为博主原创,未经允许不得转载: RequestMethod为在@RequestMapping注解中使用的一个属性,用来标识请求的方法类型,可参考@RequestMapping源码: @Target ...
- error: pcap library not found! 解决方法
参考: error: pcap library not found! error: pcap library not found! 解决方法 $ sudo apt-get install libsql ...
- HDU 4318 Power transmission(最短路)
http://acm.hdu.edu.cn/showproblem.php?pid=4318 题意: 给出运输路线,每条路线运输时都会损失一定百分比的量,给定起点.终点和初始运输量,问最后到达终点时最 ...
- 用html+css+js实现选项卡切换效果
文章转载自:http://tongling.github.io/JSCards/ 用html+css+js实现选项卡切换效果 使用之前学过的综合知识,实现一个新闻门户网站上的常见选项卡效果: 文字素材 ...
- Android Studio 使用USB真机调试教程
允许安装未知来源的软件 允许USB调试 设置启动方式 选择USB device 然后运行 会自动安装软件启动! 参考: https://blog.csdn.net/fubo1990/article/d ...
- linux 打开一个文件现swap文件
转自:http://blog.csdn.net/eckelwei/article/details/17078187 有时候在用vim打开文件时提示类似以下的信息: 发现交换文件 ".expo ...
- linq to sql and linq to object 总结
Enumable类型是linq to object 是一个很特殊的类型 这个类型的数据源都是在程序的内存中 Queryable类型是 Linq to sql 对数据库进行操作都是这个类型 ...
- 程序莫名其妙的崩溃,加断点刚进入函数就崩溃,断点不往下走,读取图片数据到程序并保存到一个HBITMAP 中
HPR_INT32 CCarManageDlg::DrawPic2UIForm(IUIFormObj* pUIForm,string& strPicName){//程序崩溃的地方 HPR_IN ...
- C#定义只能处理枚举类型的泛型类型
internal sealed class GenericTypeThatRequireAnEnum<T> { ; //该 static 字段在不同的封闭类型之间是独立不共享的 //静态构 ...
- what are stop words
what are stop words 一.总结 一句话总结:就是在seo的关键词中不要有stop words,不然的话搜索引擎会直接忽略 stop words most common words ...