git am:修补程序格式检测失败 [英] git am: Patch format detection failed

查看:871
本文介绍了git am:修补程序格式检测失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前从未使用过Git补丁,我需要一些帮助.我正在尝试将修补程序应用于Git存储库以测试Wine修补程序,特别是此处的修补程序.所以我做了以下事情:

I have never used patches with Git before and I need some help. I am trying to apply a patch to a Git repo to test a Wine patch, specifically this patch here. So I did the following:

$ git clone git://source.winehq.org/git/wine.git
$ cd wine
$ nano patch.p1

然后我用 Ctrl + Shift + V 粘贴补丁的内容,并使用 Ctrl + O 保存.然后我尝试了这个:

I then pasted the content of the patch with Ctrl+Shift+Vand used Ctrl+O to save. Then I tried this:

$ git am patch.p1
Patch format detection failed.

我做错了什么?我以前从未应用过补丁.

What am I doing wrong? I have never applied a patch before.

推荐答案

Patch format detection failed.可能意味着您使用了错误的命令:使用git apply代替git am或其他方法.

Patch format detection failed. probably means you're using the wrong command: use git apply instead of git am or the other way around.

请参见 git am和git之间有什么区别git apply?进一步了解2之间的区别.

See What is the difference between git am and git apply? for more on the difference between the 2.

这篇关于git am:修补程序格式检测失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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