今天在使用git的时候突然提示下面信息:
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
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 (got 'llll@DESKTOP-J1682P3.(none)')
但是,上面的方法配置的是全局的用户名和邮箱!就是说如果没有单独为项目配置,那提交的所有项目全部都是这个名字和邮箱!
因此你可以使用下面方式:
git config --local user.email "your@example.com"
git config --loacl user.name "your name"
本文详细介绍了在使用Git过程中遇到的身份信息配置问题及解决方案。当Git无法自动检测到用户的电子邮件地址时,会提示用户进行配置。文章提供了两种配置方法,一种是全局配置,适用于所有项目;另一种是本地配置,仅作用于当前仓库。通过这些步骤,可以避免因身份信息缺失导致的提交失败。
1648

被折叠的 条评论
为什么被折叠?



