Guides: Tell git your user name and email address
Git needs to know your username and email address to properly tag your commits. This is normally done on a global level:
[~]$ git config --global user.name "lubin"
[~]$ git config --global user.email lubin.z@gmail.com
You can override these settings on a per-repo basis:
[~/path/to/repo]$ git config user.name "lubin"
[~/path/to/repo]$ git config user.email lubin.z@gmail.com
This change will only affect future commits. Past commits will retain the username and address they were committed with.
[~]$ git config --global github.user lubin
[~]$ git config --global github.token 6ef8395fecf207165f1a82178ae1b984
Git needs to know your username and email address to properly tag your commits. This is normally done on a global level:
[~]$ git config --global user.name "lubin"
[~]$ git config --global user.email lubin.z@gmail.com
You can override these settings on a per-repo basis:
[~/path/to/repo]$ git config user.name "lubin"
[~/path/to/repo]$ git config user.email lubin.z@gmail.com
This change will only affect future commits. Past commits will retain the username and address they were committed with.
这里说一句,上面这两个都是配置邮箱和用户名, 一个是global ,另一个没有global。 我是先配置了global的 ,可是不管用, 直到配置了下面不加global的才好用的。
原因大概是 ,当全局的 和 本地的配置同时存在时, 是有一个取舍顺序的, 即先取本地的, 后取全局的。
[~]$ git config --global github.user lubin
[~]$ git config --global github.token 6ef8395fecf207165f1a82178ae1b984