unable to auto-detect email address

git错误:unable to auto-detect email address

idea 用git更新的时候报错,详细错误信息如下:

Tried to save uncommitted changes in stash before Update, but failed with an error. stash file://D:/Workspace for idea/MYProject: unable to auto-detect email address (got 'zhangshan@DESKTOP-S666666.(none)') Cannot save the current index state

最后看到这篇博客

https://www.cnblogs.com/Traveller-Leon/p/6852680.html

解决办法有效:

找到工程目录 (Project) 的.git文件夹,打开之后找到config文件,在最后边加上一句话
[user]
email=your email
name=your name

原文地址:https://www.cnblogs.com/zengpeng/p/10187894.html