


The command doesn't interpret the wildcard * as an operator per say– it just takes the "*" argument to mean "disable safe repository checks/ consider all repositories as safe".ġ - If this fails in your particular terminal program in Windows, try surrounding the wildcard with double quotes instead of single (Via this GitHub issue): However, if you are the sole user of your machine 100% of the time, and your repositories are stored locally, then disabling this check should, theoretically, pose no increased risk.Īlso note that you can't currently combine this with a file path, which would be relevant in my case. You should not do this if your repositories are stored on a shared drive. gitconfig file: īefore disabling, make sure you understand this security measure, and why it exists. Which will add the following setting to your global. This can be done by running the following command 1: git config -global -add safe.directory '*' I had the same issue and resolved it by disabling safe directory checks, which will end all the "unsafe repository" errors. git config -global -add safe.directory '*'Īdapted from this post on I cannot add the parent directory to safe.directory in Git. Silence all warnings related to git's safe.directory system. Silence all safe.directory warnings tl dr
