从邮件列表中应用git补丁 [英] Applying git patches from a mailing list

查看:64
本文介绍了从邮件列表中应用git补丁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要(从邮件列表中)将补丁应用到本地git存储库中

I need to apply a patch(from a mailing list) into a local git repository

邮件列表中的补丁有一个封面消息和一个简短的信息.我可以将适当的补丁文本粘贴复制到文件中,并将其用作补丁.如果可能的话,有人可以建议一个更好的选择吗?

The patch in the mailing list has a cover message and a brief information about it. I can copy paste the appropriate patch text into a file and use it as a patch. If possible, could someone please suggest a better alternative?

推荐答案

您可以选择 git apply git am git mailinfo .

git mailinfo 命令将处理电子邮件并将补丁与日志分开,但是通常您可以简单地使用 git am .另外请注意-剪刀

The git mailinfo command will process the email message and will separate the patch from the log, but usually you can simply use git am. Also please note the --scissors,

-剪刀

在剪线之前,清除体内的所有东西.主要由剪刀(> 8"或"8 <")和穿孔(破折号-")标记组成的行称为剪刀行,用于请求读者在该行处剪切消息.如果在修补程序之前的邮件正文中出现这样的行,则使用此选项时,将忽略该行之前的所有内容(包括剪刀行本身).

Remove everything in body before a scissors line. A line that mainly consists of scissors (either ">8" or "8<") and perforation (dash "-") marks is called a scissors line, and is used to request the reader to cut the message at that line. If such a line appears in the body of the message before the patch, everything before it (including the scissors line itself) is ignored when this option is used.

这篇关于从邮件列表中应用git补丁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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