I have a cache directory I’m trying to have ignored by git which lives in my CMS’s root directory here:
/files/cache/
I’ve tried the following variations in a .gitignore file at the root of the project:
/files/cache
/files/cache/*
files/cache
files/cache/*
But the files still show up in Tower ready to be staged – the only other thing I can think of is that I’m using comments in the file like this:
# comment
/files/cache
Just not sure what I’ve missed sorry – any help would be much appreciated
Are the files in question untracked? Please note that files that are already tracked by Git can’t be ignored. In that case you’d have to untrack them and commit the deletion, first.
In Tower’s “Status” view, which view mode do you use?
If we’re talking about folders (not only individual files) matched by a pattern, “ALL” mode will continue to show the folder as untracked (while also hiding individual files). “MODIFIED” will hide the matched patterns completely.