Ubuntu 16.04 VScode Git 用户名及邮箱配置

Ubuntu 16.04 VScode Git 用户名及邮箱配置

在Terminal中通过

git config --global user.name
git config --global user.email

命令配置完成了ubuntu的git 用户名和邮箱配置,可以正常使用Git功能,但在VScode中提交版本时始终提示未配置Git用户名和邮箱。此时在output console中提示“fatal: unable to auto-detect email address”。这可能是由于VScode中的Git插件不能识别到ubuntu下的Git模块用户名和邮箱导致的。此时可以通过配置~/.gitconfig文件进行VScode的Git插件配置:
直接在Teminal中输入

gedit .gitconfig (在gedit编辑器中修改.gitconfig文件,如果没有的话会直接新建一个这样的文件)

然后在gedit编辑器中输入

[user]
    name = Your Name (Your Name为你自己的Git用户名)
    email = [email protected][email protected]为你自己的用户名邮箱)

然后就可以在ubuntu下正常使用VScode Git模块啦!

猜你喜欢

转载自blog.csdn.net/yingyue20141003/article/details/89046851
今日推荐