比如说有两个branch,分别是master和m1,我们在m1上修改的bug怎么merge到master上呢,

怎么merge我不知道,但是有另外一个命令可以做到,比如m1做commit,sha-1为abc,

在master目录下执行 git cherry-pick abc ,即可把abc这个commit “merge” 到master

如果出现 fatal: bad object 的话,要先执行 git pull ,因为cherry-pick命令是本地特性,本地要有这个commit才可以做git cherry-pick。

文章来源:http://www.cnblogs.com/gifisan/p/5919279.html

[已解决] github merge指定commit的更多相关文章

  1. 解决上传到github报错Successfully created project 'autotest' on GitHub, but initial commit failed:

    通过IDEA上传代码到GitHub上可是有时候会碰到这样的问题. 当我们选择VCS->Import into Version Control->Share Project on GitHu ...

  2. 解决 Github用户名 变为 invalid-email-address 问题

    解决 Github用户名 变为 invalid-email-address 问题 If the identity used for this commit is wrong, you can fix ...

  3. 已解决】Sublime中运行带input或raw_input的Python代码出错:EOFError: EOF when reading a line(转)

    [问题] 在折腾: [已解决]Sublime Text 2中运行Python程序出错:The system cannot find the file specified 的过程中,虽然解决了找不到py ...

  4. 【已解决】BeautifulSoup已经获得了Unicode的Soup但是print出来却是乱码

    [问题] 某人遇到的问题: 关于BeautifulSoup抓取表格及SAE数据库导入的问题(跪求大神帮忙) 简单说就是: 用如下代码: ? 1 2 3 4 5 6 7 import re,urllib ...

  5. OpenCV 无法启动此程序,因为计算机中丢失opencv_core249.dll。请尝试重新安装改程序已解决此问题

    换了64位的系统,配置好之后运行之前的程序,竟然给我抛出这个错误.应该是我的opencv没有安装对吧.系统报错 无法启动此程序,因为计算机中丢失opencv_core249.dll.请尝试重新安装改程 ...

  6. Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge

    Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, com ...

  7. 解决 Github:failed to add file / to index 问题

    参考: Github:failed to add file / to index 解决 Github:failed to add file / to index 问题 在通过Github for Ma ...

  8. 使用git时出现Please make sure you have the correct access rights and the repository exists.问题已解决。

    使用git时,出现Please make sure you have the correct access rights and the repository exists.问题已解决. 今天我在使用 ...

  9. Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)

    在使用git pull拉取服务器最新版本时,如果出现error: Your local changes to the following files would be overwritten by m ...

随机推荐

  1. Thinkphp框架

    MVC思想: 1. 简单来说, M 即模型, m是Model的第一个字母,它用于管理程序的数据,因此它也是连接我们的PHP程序和数据库的功能.通常在模型类这一块,框架通常会使用ORM(对象关系映射). ...

  2. vert.x学习(三),Web开发之Thymeleaf模板的使用

    在vert.x中使用Thymeleaf模板,需要引入vertx-web-templ-thymeleaf依赖.pom.xml文件如下 <?xml version="1.0" e ...

  3. git学习手册

    #git学习手册 git: Git是一个开源的分布式版本控制系统,可以有效.高速的处理从很小到非常大的项目版本管理.[2] Git 是 Linus Torvalds 为了帮助管理 Linux内核开发而 ...

  4. 使用POWERDESIGNER设计数据库的20条技巧(转)

    1.PowerDesigner使用MySQL的auto_increment ◇问题描述: PD怎样能使主键id使用MySQL的auto_increment呢? ◇解决方法: 打开table prope ...

  5. jquery 给指定li添加制定的css样式

    $("ul li").eq(1).css({"color":"red"}); //第二个li $("ul li").eq ...

  6. iOS基于MVC的项目重构总结

    关于MVC的争论 关于MVC的争论已经有很多,对此我的观点是:对于iOS开发中的绝大部分场景来说,MVC本身是没有问题的,你认为的MVC的问题,一定是你自己理解的问题(资深架构师请自动忽略本文). 行 ...

  7. Cen0S下挂载设备

    在CentOS中,如果我们要查看光驱,U盘或者要把安装包挂载到某个文件夹,我写下我的一些理解. 所谓的挂载,就是把物理设备或者文件(包含安装文件,压缩包等等),与系统中的某个目录建立一个快捷方式,然后 ...

  8. [PCL]点云渐进形态学滤波

    PCL支持点云的形态学滤波,四种操作:侵蚀.膨胀.开(先侵蚀后膨胀).闭(先膨胀后侵蚀) 在#include <pcl/filters/morphological_filter.h>中定义 ...

  9. yii框架的安装

    在安装YII2.0首先我们需要下载一个composer,何为composer,简单解释为PHP的组件工具, Composer是PHP中用来管理依赖(dependency)关系的工具,你可以在自己的项目 ...

  10. MySQL查询出错提示 --secure-file-priv解决方法

    原文 在某台DB上准备运行一个SQL语句,就是用SELECT INTO OUTFILE把查询结果写入到文件的时候提示以下信息: The MySQL server is running with the ...