git config --global user.email johndoe@example.com锁定文件错误

时间:2018-07-15 23:39:39

标签: linux git

abdullah@XPS:~/Documents/repos/first_app$ git config --global user.email johndoe@example.com
error: could not lock config file /home/abdullah/.gitconfig: No such file or directory

我尝试过mkdir .gitconfig,它说它已经在那里。 当我尝试访问任何.file文件时,即使它在那里,也没有任何文件。

picture of terminal

1 个答案:

答案 0 :(得分:1)

您的全局.gitconfig文件是指向“下载”文件夹中的.gitconfig的符号链接。也许该文件不再可用?

无论如何,我建议删除符号链接并创建一个新的.gitconfig文件:

#check passwords (my function)
#check emails (my function)
#check phone (my function)

User.object.create()

#save every value to newly created object

然后您应该能够运行命令:

rm ~/.gitconfig
touch ~/.gitconfig
相关问题