I am trying to switch to the mode where I exclude everything in line 1 of .gitignore and then include the files I really want to track. Here is my .gitignore file:
*
!*.py
!README.md
!vizing.pdf
!Data*
I can add the folder Data, but I really want Data and all it subfolders. When I try to add a subfolder, this happens:
> git add Data/EdgeColoring
The following paths are ignored by one of your .gitignore files:
Data/EdgeColoring
Use -f if you really want to add them.
I tried the suggestions to this question, but they didn't help much.
> git check-ignore -v Data/EdgeColoring
.gitignore:1:* Data/EdgeColoring
I can't find another .gitignore file with a * pattern, so it seems that Data* doesn't match Data/EdgeColoring. Why is this? What is the right pattern?