git format-patch<自上次svn重新设置以来的所有内容> [英] git format-patch < everything since last svn rebase >

查看:114
本文介绍了git format-patch<自上次svn重新设置以来的所有内容>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我上次将svn服务器推送到一个大补丁后,我一直在尝试将所有更改混在一起,然后可以通过电子邮件将其发送给我的同事进行审查.我可以用git format-patch 做到这一点吗?

I'm trying to mash all my changes since I last pushed to the svn server into one big patch that I can email to my coworker for review. Can I do this with git format-patch ?

推荐答案

由于当前分支是从服务器派生的,因此可以使用git format-patch origin/master获取所有补丁. (假设HEAD是命令中的最后一个参数,所以您会得到origin/master..HEAD.)

You could use git format-patch origin/master to get all the patches since your current branch forked from the server. (The HEAD is assumed as the final argument in the command, so you are getting origin/master..HEAD.)

但是,正如VonC所暗示的那样,这可能会创建许多文件:您所做的每个提交都只有一个.patch文件!如果只需要一个大补丁文件,那么他提到的git-diff语法应该可以解决问题. (git diff origin/master.. > bigpatch.patch将为您提供自HEAD和服务器的共同祖先以来的所有更改.)

However, as VonC hints at, that could potentially create a lot of files: one .patch file for every commit you made! If you want just a single big patch file, the git-diff syntax he mentions should to the trick. (git diff origin/master.. > bigpatch.patch would give you all the changes since the common ancestor of your HEAD and the server.)

这篇关于git format-patch<自上次svn重新设置以来的所有内容>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆