M
M
Mikhail Vasiltsev2018-10-22 09:55:41
git
Mikhail Vasiltsev, 2018-10-22 09:55:41

Ignoring everything in a folder except in gitignore?

Greetings. In one project, a very large gitignore and GIT seems to process everything correctly, except for the following entries:

/parent/folder/*
!/parent/folder/child/css/something.css
!/parent/folder/child/js/something.js

That is, in theory it should work like this - ignore all folders and files in parent / folder, but take something.css and js in the right folders. But GIT ignores everything and doesn't keep track of the right two files. In this case, the paths to the files are correct.
All similar ignore rules below do not work either. That is, wherever I try to write the instruction "Ignore everything except". What's the matter?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question