Git commit 致命:无法自动检测电子邮件地址(got';MS@folder.(无)

Git commit 致命:无法自动检测电子邮件地址(got';MS@folder.(无),git-commit,git-config,Git Commit,Git Config,我只是无法使用GitBash在github上添加文件 错误消息: fatal: unable to auto-detect email address (got 'M S@folder.(none)') 我试过这个命令: git commit -m "first commit" filename 有什么帮助吗?运行git config--global--list。对于user.name和user.email,它会返回什么?这是否回答了您的问题?错误:src refspec

我只是无法使用GitBash在github上添加文件

错误消息:

fatal: unable to auto-detect email address (got 'M S@folder.(none)')
我试过这个命令:

git commit -m "first commit" filename

有什么帮助吗?

运行
git config--global--list
。对于
user.name
user.email
,它会返回什么?这是否回答了您的问题?错误:src refspec master不匹配任何错误:未能将某些ref推送到“”此消息显示要执行的操作??看起来默认分支设置为
main
或任何其他名称,而不是
master
。请核实你是否是这样。消息表明refspec对master一无所知。请运行
git show ref
查看它是否返回main或master