Having a git repository based on the following directory structure:
DIR_A
+------DIR_B
+------DIR_C
+------DIR_D
+------DIR_E
Having DIR_A have a .gitignore file that ignores "*.bin"
I want that .gitignore to be applicable to all subdirectory structures except DIR_E. I don't want to set a gitignore that is hardcoding all paths, since more could be added and things would require maintenance and therefore potential mistakes.... So the preferrable way is to have a single .gitignore that excludes DIR_E...
This is what I tried, but it does not seem to work:
.gitignore (content under DIR_A) :
*.bin
!DIR_E
Any ideas why this does not work?
Try ignoring files rather than folders:
*.bin
!DIR_E/*.bin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With