Suppose there is a 2-level nesting of directories
a1{1..10}/a{1..10}/{test}, b1..., ... w... How can I exclude a1, a2, a3, a4, but leave a {1..4} / a1 / {test}?
Example:
mkdir -pa{1..10}/a{1..10} cat .gitignore !a2/test a1/a2 a2 !a1/a2/test
touch {a1,a2,a1/a2}/test git status a2/test a1/a2/test На ветке master Начальный коммит нечего коммитить (создайте/скопируйте файлы, затем запустите «git add», чтобы отслеживать их)
Those. so it does not work. It turns out I need to describe in .gitignore the following structure for each file:
cat .gitignore !a1/ a1/* !a1/a1 a1/a1/* !a1/a1/test
And if> 5 levels of nesting?
Is it possible to make it easier?