E
E
Express7772016-01-18 08:20:21
git
Express777, 2016-01-18 08:20:21

How to correctly exclude subfolders of Bitrix using gitignore?

Hello.
I can't figure out what the error is when excluding folders in gitignore
Here is the whole short code:

# core
/bitrix/*
/bitrix/php_interface/dbconn.php
/bitrix/components/bitrix/
/bitrix/templates/

!/bitrix/templates/bitrix24/
!/bitrix/php_interface/
!/bitrix/components/

I can not exclude from ignoring ONLY the bitrix24 folder.
joxi.ru/l2ZnJRQh8ly602
As you can see on the screenshot, the bitrix24 folder is gray. This means she is excluded from the git. More precisely, the entire templates folder with all subfolders and files is ignored.
With these rules:
# core
/bitrix/*
/bitrix/php_interface/dbconn.php
/bitrix/components/bitrix/
#/bitrix/templates/

!/bitrix/templates/
!/bitrix/php_interface/
!/bitrix/components/

the entire temlates folder is excluded.
joxi.ru/l2ZnJRQh8lYD02
How to correctly write the rules so that the templates folder is ignored, but there would be an exception for the bitrix24 subfolder?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya, 2016-01-18
@bitrixd

/*
!/bitrix
/bitrix/*
!/bitrix/templates
/bitrix/templates/*
!/bitrix/templates/bitrix24

O
Oleg Maksimenko, 2016-01-19
@olegprof

https://www.olegpro.ru/post/primery_fayla_gitignor...

D
Dark_Scorpion, 2016-03-01
@Dark_Scorpion

I use the local folder, and in gitignore I have the entire Bitrix folder!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question