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 时,它说没有这样的文件,即使它就在那里。
最佳答案
您的全局 .gitconfig 文件是您下载文件夹中 .gitconfig 的符号链接(symbolic link)。也许该文件不再可用?
无论如何,我建议删除符号链接(symbolic link)并创建一个新的 .gitconfig 文件:
rm ~/.gitconfig
touch ~/.gitconfig
然后您应该能够运行您的命令:
git config --global user.email johndoe@example.com
关于linux - git config --global user.email johndoe@example.com 锁定文件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51353019/