预期提交者名称Git推送问题 [英] Expected Committer Name Git Push Issue

查看:1309
本文介绍了预期提交者名称Git推送问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图提交/推送一些代码给GIT,但是当我尝试使用SourceTree提交代码时,它给了我一个错误:  remote:推送被拒绝。[K 
remote:
remote:refs / heads / Branch Details:6a5d6d4cdd53db591e53db78c51225a619af487f:预期提交者姓名'Your Name Complete',但找到'Your Name'[K
remote:

提交完成,但代码不会被推送到远程。



我刚刚在全局设置中注意到我是您的姓名,我在全局配置中更改了它(您的姓名完整),还验证了名称工具 - >选项,现在显示您的姓名已完成。
我也试过:

pre $ g $ git config --global user.name正确的用户名
git config --global user.emailyour@email.com

但仍无法推送更改,仍然有同样的错误,任何人都可以帮助我将代码推送到远程存储库?

此博客文章 (这是一个标签,在你的情况下它是一个分支HEAD),你至少需要修改你想推送的分支HEAD:

  git commit --amend --allow-empty --author =姓氏,名字< name@email.com> 

然后按下。


I'm trying to commit/Push some code to GIT, but when I tried to commit the code using SourceTree it gave me an error:

remote: Push rejected.[K
remote: 
remote: refs/heads/Branch Details: 6a5d6d4cdd53db591e53db78c51225a619af487f: expected committer name 'Your Name Complete' but found 'Your Name'[K
remote:

Commit is done, but code is not pushed to remote.

I just noticed in the Global setting that my was "Your Name" and I changed it (TO: Your Name Complete) in Global configuration, also verified the name in Tools --> Options and its showing "Your Name Complete" now. I also tried:

git config --global user.name "Correct User Name"
git config --global user.email "your@email.com"

but still unable to Push the changes, still the same error can any one help me to push the code to remote repository?

解决方案

Following the example of this blog post (it was for a tag, in your case it is for a branch HEAD), you would need to amend at least just the branch HEAD you want to push:

git commit --amend --allow-empty --author="LastName, FirstName <name@email.com>"

And then push.

这篇关于预期提交者名称Git推送问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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