So I have a repo where I didn't add anything to ignore .png
files but they are ignored anyways.
Why is this happening, and how can I fix it?
If you want to be sure if a file is ignored, and (if it is) by which .gitignore, simply use:
git check-ignore -v -- myfile.png
git check-ignore
will display the relevant .gitignore
file and the relevant rule.
In order to start tracking previously ignored files or patterns:
cd <path>
.git add -f <file name>.extension
for a specific file or git add -f *.png
for all png files.
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.