fatal: cannot use /Users/myname/ as an exclude file

I get this error whenever I try to type the command git init, it gives me the above error. How do I solve this error?

有帮助吗?

解决方案

Check the .gitconfig in your home directory. You almost guaranteed have the line

exclude /Users/myname/

in it

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top