Git,https://developer.aliyun.com/article/716483

配置用户名
1
2
3
4
5
git config --global user.name ""
// 配置用户名和邮箱其实是在全局的gitconfig目录下添加了以下内容(~/.gitconfig)
[user]
name = abc
email = abc@abc.com
配置邮箱
1
git config --global user.email ""
每次进行git操作都会让输入账号密码,可以用下面的命令长期存储一下账号密码
1
2
3
4
5
// 输入一次密码后,git会记住账号密码。
git config --global credential.helper store
// 这个命令其实是在主目录的gitconfig目录下添加了以下内容(~/.git/config)
[credential]
helper = store

git怎么知道是哪个平台的配置呢,拉取哪个平台的代码就会判断是否有邮箱和密码,是否是这个平台的,再判断是否有权限?