git上传文件到远程仓库的小小问题

以下属于笔者个人经验,若有不足,请以指正

在向远程的github仓库上传文件时,若要需要认证账户的问题
Run

git config --global user.email “[email protected]
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (
git上传文件到远程仓库的小小问题
若遇到与笔者相同的问题,且输入
git config --global user.email “[email protected]
git config --global user.name “Your Name”
未能解决,依然报错,则可以尝试换一种输入
git config user.name “Your Name”
git config user.email “[email protected]
区别:第一个是在全局中执行
第二个是在.git文件夹执行