git:修补程序没有有效的电子邮件地址 [英] git: Patch does not have a valid e-mail address

查看:1220
本文介绍了git:修补程序没有有效的电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想将这个补丁应用到我在git仓库中的代码中。



当我使用subversion时,这个过程非常简单:右键 - > tortoise svn - >应用补丁。它总是按我的预期工作。



但我不能使用git来做到这一点。 Git不适用我的补丁。它抱怨



修补程序没有有效的电子邮件地址。

所以,我的问题是:
在这种情况下如何应用补丁文件?解决方案

解决方案

意味着与Git工具一起使用。使用

  git apply< patch> 

如果补丁不是用Git创建的,那么只需要在后面使用补丁程序Git的。通常这是程序补丁:

 补丁< patch> 

在应用该补丁后,像平常一样在Git中添加并提交。


I have a patch-file.

I want to apply this patch to my code in git repository.

When I used subversion this process was quite simple: right click -> tortoise svn -> apply patch. It always works as I expected.

But I cannot do this using git. Git doesn't apply my patch. It complains about

Patch does not have a valid e-mail address.

So, my question is: "How apply patch file in this situation?"

解决方案

Git created patches are meant to be applied with Git tools. Use

git apply <patch>

If the patch is not created with Git, then just use a patch program 'behind the back' of Git. Often this is the program 'patch':

patch <patch>

After applying the patch, add and commit in Git as usual.

这篇关于git:修补程序没有有效的电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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