.gitignore negates by mask problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Problem:
Not possible to setup exclusion with /**/ mask and names with "dot"

Directory structure:
conf/
conf/server.conf
conf/server.conf.default
conf/etc/
conf/etc/php.ini
conf/etc/php.ini.default
conf/etc/init.d/
conf/etc/init.d/fail2ban
conf/etc/init.d/fail2ban.default
controls/
controls/on_server_start

Require:
1. track all files in all directories except conf/
2. inside conf/ directory require track only *.default files


My tries of .gitignore:
1.
/conf/**/*
!/conf/**/*.default

result: 
git check-ignore -v --no-index conf/etc/init.d/fail2ban.default
.gitignore:1:/conf/**/* conf/etc/init.d/fail2ban.default


2.
/conf/**/*.
!/conf/**/*.default

result: 
git check-ignore -v --no-index conf/etc/init.d/fail2ban.default
.gitignore:2:!/conf/**/*.default        conf/etc/init.d/fail2ban.default

but
git check-ignore -v --no-index conf/server.conf
(empty)


Tested on Git v2.18.0(linux) and v2.20.1(windows)
--
Maxim



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux