git format-patch 使用方法
2015-05-08 15:40
387 查看
git format-patch 使用方法
分类: git2013-09-1321:00 7265人阅读 评论(0) 收藏 举报
使用git format-patch生成所需要的patch:
# git format-patch -s 1bbe3c8c197a35f79bfddaba099270a2e54ea9c7
please replace the hash code with your repo previous commit.
then you can find the patch under repo directory.
then mail your patch to configuration admin.
# git format-patch -M master // 当前分支所有超前master的提交
# git format-patch -s 4e16 // 某次提交以后的所有patch, --4e16指的是SHA1
ID
# git format-patch -1 // 单次提交
# git format-patch -3 // 从master往前3个提交的内容,可修改为你想要的数值
# git format-patch –n 07fe // -n指patch数,07fe对应提交的名称, 某次提交(含)之前的几次提交
# git format-patch -s --root origin // 从origin到指定提交的所有patch
应用patch:
先检查patch文件:# git apply --stat newpatch.patch
检查能否应用成功:# git apply --check newpatch.patch
打补丁:# git am --signoff < newpatch.patch
(使用-s或--signoff选项,可以commit信息中加入Signed-off-by信息)
或git am
相关文章推荐
- git format-patch 使用方法
- git format-patch 使用方法
- git format-patch的使用
- [转]使用git-am合并git format-patch生成的一系列的patch
- [转]使用git-am合并git format-patch生成的一系列的patch
- git简介及使用方法&Patch功能
- git format-patch 常用方法
- git-am 和 format-patch 的使用
- git format-patch 常用方法
- git patch 使用方法
- 使用git-am合并git format-patch生成的一系列的patch
- 使用git-am合并git format-patch生成的一系列的patch
- Git cherry-pick和format-patch(给分支打补丁)区别和使用场景
- git format-patch的使用【转】
- git format-patch制作使用patch
- 使用 git 生成patch和使用patch
- linux打补丁和git打patch方法
- JAVA字符串格式化:String.format()方法的使用
- Git的使用--如何将本地项目上传到Github(两种简单、方便的方法)
- 【java字符串格式化】String.format()使用方法