Answer the question
In order to leave comments, you need to log in
How to exclude all files from consideration in git, except for some, incl. in subfolders?
Hello!
I'm trying to exclude all files from consideration in git, except for the empty( 1 )
*
.html files that are on the same level as gitignore and any files in the img
subfolder
. )*.html
!/img/*
Everything works fine with empty(1)*.html files, git sees them, but files from the img/ folder continue to be excluded from consideration.
Please tell me what is wrong.
Answer the question
In order to leave comments, you need to log in
If you're on a Unix system, /img/ refers to the img folder at the beginning of the file system.
Try
or!./img/*
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question