Problem z regułą gitignore

0

Chcę trzymać pliki potrzebne do debugowania: .idea/runConfigurations/*.xml
a resztę w .idea/ ignorować i tak mniej więcej wygląda .gitignore:

#vs & vscode
.vs/
.vscode/*
#keep debug file
!.vscode/launch.json

#webstorm
.idea/*
!.idea/runConfigurations/*.xml

problem leży w tym iż pliki są ignorowane mimo wszystko, a w przypadku reguły która działa analogicznie dla ."vscode/launch.json" wszystko działa bez problemu

Sprawdzałem jeszcze:

git check-ignore -v .idea/runConfigurations/Attach_to_main.xml
>> .gitignore:24:.idea/*   .idea/runConfigurations/Attach_to_main.xml

Po zmianie reguł na:

#webstorm
.idea/runConfigurations/*.xml

pliki są poprawnie ignorowanie, więc ścieżki na pewno są dobre

Macie może jakieś pomysły co może być nie tak?
Z góry dzięki za pomoc

1

Git - gitignore Documentation

An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined. Put a backslash ("\") in front of the first "!" for patterns that begin with a literal "!", for example, "\!important!.txt".

1 użytkowników online, w tym zalogowanych: 0, gości: 1