简体   繁体   中英

Warning and fatal error when using git on windows?

When I want to get the current status or use any git command I will see these two lines of errors:

warning: unable to access 'C:/Program Files (x86)/Git': Permissio
fatal: cannot use C:/Program Files (x86)/Git as an exclude file

Where is the problem ?
Thanks in advance!

Use an exclude file that exists

As indicated by @iltempo's comment - this error occurs because there is a reference to read the file C:/Program Files (x86)/Git which isn't a file or doesn't exist.

A global git ignore file is a good idea - after creating one (if you don't already have one) - update the location that git is using so that it's used:

git config --global core.excludesfile C:/Users/me/global.gitignore

Alternatively to just remove the error, remove the reference:

git config --global --unset core.excludesfile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM