0

i using the .gitignore below. surprisingly it ignores the file Source\config\config.inc.ahk

last line tried whitelist all files and subfolders in the source folder !Source/**

Therefore i expected that Source\config\config.inc.ahk is not ignored. How could i fix that?

UPDATE: This may answerd my question: You have to unignore every directory in the path that you wish to unignore. Git ignore except specific subdirectories

what i have tried:

# Ignore everything
*

# Whitelist some files
!.gitignore
!README.md

# Whitelist folder files files, and subfolders
!Source/**

(complete .gitignore: https://github.com/sl5net/global-IntelliSense-everywhere-Nightly-Build/blob/master/.gitignore)

SL5net
  • 2,282
  • 4
  • 28
  • 44
  • https://stackoverflow.com/search?q=%5Bgitignore%5D+unignore+subdirectory – phd Mar 10 '19 at 18:38
  • 1
    After ignoring everything you need to unignore `/Source/` before ungnoring `/Source/*`: `!/Source/`. – phd Mar 10 '19 at 18:39
  • yes this works. `!Source/` followed by `!Source/**` . so sad to need for this two comands. I do not see any sense in it. It seems to me `!Source/**` should be clear enough. I hope in a future version, no two commands are needed anymore. – SL5net Mar 10 '19 at 18:56
  • After `*` the unignore directive `!Source/**` is not consulted at all. I don't think this will be changed. – phd Mar 10 '19 at 19:17
  • @phd ok its not be consulted at all. then it is in my opinion a design flaw. Because what else should it mean? Better just use one line, which is easy to understand. I think this line alone is also good to understand. Or not? – SL5net Mar 10 '19 at 19:24

0 Answers0