Sorry, my fault, I didn’t notice the difference between dots and hyphens in the names (poor eyesight and small fonts on the screen).
Mhhh, that’s strange anyhow; probably there’s a problem with the pattern definition then. I think that the first rule
*.* is also matching folder names with dots in them in this case, and that the negation
!a-V*/** might not be working out as expected because of the double
Try changing the
.gitignore rule to (or add to it):
Maybe this could work. Keep in mind that the exception rule that you wrote did not specify the root folder in the pattern, which is often the cause of rules ending up being applied where they weren’t intended to. When you want to apply a rule to specific folder, add the root
/ at the start, so you’re sure they’ll be applied to the root folders.
Did you try the suggested
git ls-files .... command? It provides useful info on how Git is treating the ignore rules in the repository. In real practice, with projects containing lots of files, you’ll have to try and make both generic patterns and path-specific patterns, and the git ls-files …` command is going to be your best friend to check that everything is working as expected.