A
A
Alexis178422016-01-04 06:58:25
git
Alexis17842, 2016-01-04 06:58:25

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

1 answer(s)
K
Konstantin Dovnar, 2016-01-04
@SolidlSnake

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 question

Ask a Question

731 491 924 answers to any question