I try to use .gitkeep but no matter what I tried it just does not work.
For example I had a folder structure like this:
.
├── a
│ ├── aa
│ │ ├── aaa
│ │ │ ├── .gitkeep
│ │ │ └── test.txt
│ │ ├── .gitkeep
│ │ └── test.txt
│ ├── .gitkeep
│ └── test.txt
├── b
│ ├── bb
│ │ ├── bbb
│ │ │ └── test.txt
│ │ ├── .gitkeep
│ │ └── test.txt
│ └── test.txt
└── .gitignore
I had the .gitignore like this:
*
!a/.gitkeep
!*/.gitkeep
!**/.gitkeep
!.gitignore
The idea is to keep all the folders with .gitkeep. Surprisingly, no folders will be tracked with this config.
Can anyone tell me why this does not not work?