Git作者未知 [英] Git author Unknown

查看:162
本文介绍了Git作者未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所有提交中的作者姓名都是未知 https://github.com/freeenergy/Teacher-Login-Validation-Module



做到了这一点

  $ git config --global user.name名字姓氏设置系统上所有git实例的用户名
$ git config --global user .emailyour_email@youremail.com

但作者/提交者名称显示为[未知]



不知道我在做什么我尝试设置$ GIT_AUTHOR_NAME =我的名字,并将我的名字更改为我的用户名[freeenergy](IE的问题已修复。)但是当我切换回到另一台电脑时,问题是一样的。



我的配置文件现在看起来像这样,但仍然是[unknown]

  [core] 
repositoryformatversion = 0
filemode = false
bare = f alse
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remoteorigin]
url = git@github.com :freeenergy / my-project.git
fetch = + refs / heads / *:refs / remotes / origin / *
[user]
name = my name
email = myEmail .com


解决方案

> git config ,你可以直接编辑你的〜/ .gitconfig 文件。查看是否有 [用户] 部分的相关信息。例如,我的〜/ .gitconfig 有这个...

  [user] 
name = Bob Gilmore
email = me@mydomain.com

(在 [user] 前面没有空格,名称和电子邮件标签前有单个标签)

如果它没有正确设置,请继续并手动编辑.gitconfig文件。


my author name in all my commits is coming up as unknown https://github.com/freeenergy/Teacher-Login-Validation-Module

did this

$ git config --global user.name "Firstname Lastname"Sets the name of the user for all git instances on the system
$ git config --global user.email "your_email@youremail.com"

but still the author/committer name shows [unknown]

not knowing what I was doing I experimented with setting $ GIT_AUTHOR_NAME="my name" and it changed my name to my username [freeenergy] (I.E. my issue was fixed.) But when I switched back to my other computer the issue was the same.

my config file now looks like this but is still committing as [unknown]

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    url = git@github.com:freeenergy/my-project.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[user]
    name = my name
    email = myEmail.com

解决方案

Even better than running git config, you can edit your ~/.gitconfig file directly. Look and see if there's a section for [user] with the relevant information. For example, my ~/.gitconfig has this...

[user]
    name = Bob Gilmore
    email = me@mydomain.com

(There's no space in front of the [user], and single tabs in front of the name and email labels)

If it doesn't have those set properly, just go ahead and edit the .gitconfig file by hand.

这篇关于Git作者未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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