修改github commit 的作者信息

版权声明:如若转载,请联系作者。 https://blog.csdn.net/liu16659/article/details/85028924

修改github commit 的作者信息

0. 问题

提交的代码无法记录在github中,意思就是如下图中 “绿方格”
在这里插入图片描述
这里只记住了我的创建 repository 时的操作,我提交代码时都没有被计算在内,这是为什么呢?原因是我提交代码的用户名不对。如下便是修改的方法。

1. 配置方法

git config --global user.email "[email protected]"
git config --global user.name "your name"

如果是windows电脑,在C:\Users\Administrator中会生成一个.gitconfig文件,里面记录的就是提交代码的用户的信息。如下示:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/liu16659/article/details/85028924