fatal: unable to auto-detect email address

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/caishu1995/article/details/82587938

    同事第一次用git,然后提交的时候报错fatal: unable to auto-detect email address (got 'tim@newton.(none)')

    在网上查了下,发现一个简单的,治标不治本的方法

在 .git 文件夹中找到 config 文件,在最后边加上
[user] 

email = ...

name = ...

    然后找到另外一个,算是 治本 的方法

git config --global user.email "..."

git config --global user.name "..."

这是在本机git上设了一个全局变量,用来对应用户名和邮箱。

这样以后这台电脑上就不用再配置了

猜你喜欢

转载自blog.csdn.net/caishu1995/article/details/82587938
今日推荐