OC系列教程之gitError:unable to access '.config/git/attributes

xcode中git进行commit时提示“warning: unable to access '.config/git/attributes': Permission denied”这种错误~

解决方案如下:

打开终端,依次输入如下命令:

cd  ~/



ls -al



查看弹出的文件的归属,若是".config权限归属于root",如下图所示,



若config如上图所示,则终端接着输入“sudo chown my_user_name .config”,注意替换my_user_name;


之后git 中提交commit命令代码正确上传





参考链接:

https://stackoverflow.com/questions/27150926/unable-to-access-git-attributes

你可能感兴趣的:(OC系列教程之gitError:unable to access '.config/git/attributes)