Answer the question
In order to leave comments, you need to log in
Why don't exclusions work in gitignore?
For a Bitrix project, I set up ignoring the bitirx folder. But there are a few files in the admin subfolder that need to be monitored.
those.
bitrix - ignore
bitrix/admin - ignore
But bitrix/admin/filename.php should be tracked
In gitignore I set:
bitrix/*
!bitrix/admin/
bitrix/admin/*
!bitrix/admin/filename.php
Answer the question
In order to leave comments, you need to log in
/bitrix/*
!/bitrix/admin/
/bitrix/admin/*
!/bitrix/admin/filename.php
You can not add exceptions to .gitignore, but simply add these files manually via
git add
and commit. They will be subsequently tracked despite the fact that the entire folder is in .gitignore
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question