vscode中 解决 请确保已在Git中配置您的“user.name”和“user.email”
在一台公司的电脑上修改了自己的代码,却发现没法提交(commit),还报出这个错误:请确保已在Git中配置您的“user.name”和“user.email”
回想了下之前关于git的东西,新的项目要初始化,新安装的git要配置用户名和邮箱
$ git config --global user.name "your_username" # 配置用户名
$ git config --global user.email "your_email" # 配置邮箱
查看git中配置的用户名和邮箱
$ git config user.name
$ git config user.email
如果没有输出,则需要配置一下。
user.name
和 user.email
只是区分账户是谁,不需要一定是github账号;
参考:
[解决:请确保已在Git中配置您的“user.name”和“user.email” – 简书](https://www.jianshu.com/p/037821732448)
[vscode中 解决 请确保已在Git中配置您的“user.name”和“user.email”_兜兜哒哒的博客-CSDN博客_请确保已在git中配置您的username](https://blog.csdn.net/qq_44409163/article/details/113933630)