unable to access '/Users/dida/.config/git/attributes': Permission denied
问题 When I do some git operations, such as ' git diff ' or ' git add . ', it shows that warning: unable to access '/Users/dida/.config/git/attributes': Permission denied I wonder which config I did wrong and how can I fix it? It's better with some commands, I am using mac command line 回答1: Seems you've run sudo -H and sudo changed the ownership of some files to root . Take the files back: sudo chown -R dida /Users/dida 回答2: Cause Git reads config settings from a variety of paths and the doesn't