Generate patch through git diff

http://stackoverflow.com/questions/1191282/how-to-see-the-changes-between-two-commits-without-commits-in-between

you can simply pass the 2 commits to git diff like :

-> git diff 0da94be  59ff30c > my.patch
-> git apply my.patch

error: cannot apply binary patch to 'UKERecognition/UKIncentive.Web/static/img/rose.jpg' without full index line

https://stackoverflow.com/questions/17152171/git-cannot-apply-binary-patch-without-full-index-line

Checkout the branch from which you want to create the patch. Run this command:

git diff-index 79fd4d7 --binary > ~/Desktop/my-patch

Where 79fd4d7 is a placeholder for the commit that came right before the range of commits you want to diff. (e.g. I want a patch that contains the first three commits below:

No such file or directory

https://drupal.stackexchange.com/questions/13387/applying-a-patch-doesnt-work

It is possible that the patch was rolled before the days of Git on drupal.org.

For old patches:

patch -p0 < thepatch.patch

For new patches that mysteriously fail with git apply:

patch -p1 < thepatch.patch

git diff show file name only

https://stackoverflow.com/questions/9848347/can-i-make-git-diff-only-show-the-changed-file-names-and-line-numbers/55225156#55225156

clu@WASYGSHA01-1020 MINGW64 /c/repository/GitHub/ChuckLu/Test/HearthbuddyRelease (master)
$ git diff --stat
JitProfiles/JitProfile.jpf | Bin 25040 -> 16040 bytes
Routines/DefaultRoutine/Silverfish/ai/CardDB.cs | 396 +++
.../DefaultRoutine/Silverfish/ai/ComboBreaker.cs | 32 +-
.../Silverfish/behavior/control/_mulligan.txt | 16 -
.../DefaultRoutine/Silverfish/data/_carddb.txt | 2562 +++++++++++++++++++-
Settings/Global/GlobalSettings.json | 2 +-
6 files changed, 2974 insertions(+), 34 deletions(-)

git difff的更多相关文章

  1. 用git difff 生成补丁

    http://stackoverflow.com/questions/1191282/how-to-see-the-changes-between-two-commits-without-commit ...

  2. Git版本控制系统之基本使用

    最早是通过接触著名的开源社区Github了解到Git的,但一直没有系统学习过.这次下定决心从头到尾系统的学一学,也将学习过程记录于此,供大家批驳.本篇文章先从以下几个方面简单了解一下Git: Git的 ...

  3. git 学习(1) ----- git 本地仓库操作

    最近在项目中使用git了,在实战中才知道,以前学习的git 知识只是皮毛,需要重新系统的学一下,读了一本叫  Learn Git in a Month of Lunches 的书籍,这本书通俗易懂,使 ...

  4. Git 子模块 - submodule

    有种情况我们经常会遇到:某个工作中的项目需要包含并使用另一个项目. 也许是第三方库,或者你 独立开发的,用于多个父项目的库. 现在问题来了:你想要把它们当做两个独立的项目,同时又想在 一个项目中使用另 ...

  5. Git 在团队中的最佳实践--如何正确使用Git Flow

    我们已经从SVN 切换到Git很多年了,现在几乎所有的项目都在使用Github管理, 本篇文章讲一下为什么使用Git, 以及如何在团队中正确使用. Git的优点 Git的优点很多,但是这里只列出我认为 ...

  6. Git与Repo入门

    版本控制 版本控制是什么已不用在说了,就是记录我们对文件.目录或工程等的修改历史,方便查看更改历史,备份以便恢复以前的版本,多人协作... 一.原始版本控制 最原始的版本控制是纯手工的版本控制:修改文 ...

  7. Git Bash的一些命令和配置

    查看git版本号: git --version 如果是第一次使用Git,你需要设置署名和邮箱: $ git config --global user.name "用户名" $ gi ...

  8. 在Ubuntu 16.10 安装 git 并上传代码至 git.oschina.net

    1. 注册一个账号和创建项目 先在git.oschina.net上注册一个账号和新建一个project ,如project name 是"myTest". 2.安装git sudo ...

  9. 史上最详细git教程

    题外话 虽然这个标题很惊悚,不过还是把你骗进来了,哈哈-各位看官不要着急,耐心往下看 Git是什么 Git是目前世界上最先进的分布式版本控制系统. SVN与Git的最主要的区别 SVN是集中式版本控制 ...

随机推荐

  1. css之页面三列布局之左右上下高度固定,中间自适应

    第一种,绝对定位 !DOCTYPE HTML> <html> <head> <meta charset="gb2312"> <tit ...

  2. 详解redis服务

    http://mp.weixin.qq.com/s?__biz=MzIyMDA1MzgyNw==&mid=2651968327&idx=1&sn=6e6cb01d334d7ae ...

  3. openwrt xfrp移植

    对开源软件表示支持 https://github.com/KunTengRom/xfrp 上传编译,选择 cp .config xxx make 刷机 客户端配置文件: /tmp/etc# cat x ...

  4. 【JZOJ3422】水叮当的舞步

    description 水叮当得到了一块五颜六色的格子形地毯作为生日礼物,更加特别的是,地毯上格子的颜色还能随着踩踏而改变. 为了讨好她的偶像虹猫,水叮当决定在地毯上跳一支轻盈的舞来卖萌~~~ 地毯上 ...

  5. JavaScript - 常用对象相关

    1. String对象 length : 字符串的长度 charAt(index) : 返回指定位置的字符串, 下标从0开始 indexOf(str) : 返回指定的字符串在当前字符串中首次出现的位置 ...

  6. thinkphp 原样输出

    可以使用literal标签来防止模板标签被解析,例如: 大理石构件 <literal> <if condition="$name eq 1 "> value ...

  7. eclipse配置外部工具利用javah编译生成头文件

    1. 点击eclipse工具栏外部工具按钮,打开配置外部工具 2. 新建一个启动配置,起名为Generate C and C++ Header File,按照下图配置好相应的参数 3. 运行该工具时, ...

  8. SpringCloud学习笔记(六):Feign+Ribbon负载均衡

    简介 官网解释: http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign Feign是一个声明式WebS ...

  9. Android Support 包的作用、用法

    1, Android Support V4, V7, V13是什么?本质上就是三个java library. 2,  为什么要有support库?如果在低版本Android平台上开发一个应用程序,而应 ...

  10. HDU-1423-Greatest Common Increasing Subsequence-最长公共上升子序列【模版】

    This is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence ...