In my .gitignore file, I was ignoring a directory like this:
var
Then I realized I want to track var/package
and all its contents. So, I've added that exclusion to gitignore. I've tried many combinations, but have settled on the following for what seems to be logical, especially from other discussions here.
!var/
var/*
!var/package
!var/package/
!var/package/*
But whenever new files are written to var/package
, they are not detected. They are added if I --force them specifically, but not through usual procedures such as git add .
Is there a command I need to be issuing to reset .gitignore to now finally pick up the new gitignore instructions? Am I missing something?