用git difff 生成补丁
Generate patch through git diff
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
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 生成补丁的更多相关文章
- git diff 与git format-patch 生成补丁包
git diff commit_id 会生成最后一次提交到目前修改过的内容补丁 git diff commit_id1 commit_id2 会生成两次提交之间修改过的内容补丁 git format- ...
- git如何生成单个文件的补丁
背景:有时候碰到一个commit包含了好几个文件的修改,但是我只需要其中一个文件的修改内容,那么这时候就需要以下方法来生成这一个文件对应修改内容的补丁 答:git format-patch " ...
- git diff比较版本差异(生成补丁)
1.git diff [<options>] <commit> <commit> options 使用--name-only(git diff HEAD cd504 ...
- git apply、git am打补丁.diff 和 .patch【转】
本文转载自:https://www.jianshu.com/p/e5d801b936b6 前提: 生成patch: git format-patch -M master 生成指定patch,0163b ...
- diff生成补丁与patch打补丁
1.使用diff生成补丁: diff是Linux下的文件比较命令,参数这里就不说了,直接man一下就行了,不仅可以比较文件,也可以比较两个目录,并且可以将不同之处生成补丁文件,其实就是一种打补丁的命令 ...
- 多个git账户生成多份rsa秘钥实现多个账户同时使用配置
下文分享一个多个git账户生成多份rsa秘钥实现多个账户同时使用配置例子了,这个例子非常的好用对于有多个git的朋友有不小的帮助. 使用过git的童鞋应该对id_rsa秘钥不陌生,总得用github吧 ...
- Git简单生成生成公钥和私钥方法
Git简单生成生成公钥和私钥方法 Git配置 Git安装完之后,需做最后一步配置.打开git bash,分别执行以下两句命令 git config --global user.name “用户名” g ...
- Git密钥生成步骤SSH Key
顺便推荐下自己的网站: 一个php后台极速开发框架 https://www.lotusadmin.top/ 一个有趣的网站 https://www.waytomilky.com/ Git是分布式的代码 ...
- 如何为openwrt生成补丁
答:使用quilt工具 步骤如下: 1. 配置quilt $cat> ~/.quiltrc <<EOF QUILT_DIFF_ARGS="--no-timestamps - ...
随机推荐
- 【python】 开始第一个项目
根据这篇文章开始上手 http://www.oschina.net/translate/the-flask-mega-tutorial-part-i-hello-world 再加点东西 如果你的环境是 ...
- Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'(using password: YSE)
安装mysql后,使用命令登录mysql居然报错了,Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'(using ...
- 升级Mac osx 10.10 后安装php 的mcrypt extension
昨天折腾到凌晨四点多,今天又到这个点,终于成功了,心情比较复杂,先记录一下,改日再整理,此刻头昏脑胀,只想蒙头大睡. 发的问题,还没人回复,自己找到答案了,英语比较蹩脚,凑合看.. http://st ...
- asp.net 多个域名重定向,在web.Config中配置
一个网站有多个域名,但是需要在访问其中某个域名之后跳转到另一域名. Web.config 中配置 </system.webServer> <!--重定向 域名 开始--> &l ...
- ServiceStack.OrmLite 调用存储过程
最近在做关于ServiceStack.OrmLite调用存储过程时,有问题.发现ServiceStack.OrmLite不能调用存储过程,或者说不能实现我想要的需求.在做分页查询时,我需要传入参数传出 ...
- 【BZOJ 1026】 [SCOI2009]windy数
Description windy定义了一种windy数.不含前导零且相邻两个数字之差至少为2的正整数被称为windy数. windy想知道,在A和B之间,包括A和B,总共有多少个windy数? In ...
- 【个人笔记】002-PHP基础-01-PHP快速入门-02-PHP语言相关介绍输
002-PHP基础-01-PHP快速入门 02-PHP语言相关介绍 1.PHP是什么 Hypertext Preprocessor超文本预处理器 是一种通用开源脚本语言 Personal Home P ...
- Careercup - Facebook面试题 - 5671785349513216
2014-05-02 01:05 题目链接 原题: bool anaStrStr (string needle, string haystack) { } Write a function that ...
- 一些css效果积累
悬浮效果: ul li a{text-decoration: none;color: black} ul li a:hover{color: blue} 鼠标变小手 span:hover{cur ...
- Deep Learning and Shallow Learning
Deep Learning and Shallow Learning 由于 Deep Learning 现在如火如荼的势头,在各种领域逐渐占据 state-of-the-art 的地位,上个学期在一门 ...