I have seen this post about no longer tracking a previously tracked file, but here is my situation.
I previously committed a directory. I now want to untrack everything in that directory but still track the directory itself.
I have added
/auto-save-list/*
to the .gitignore
file (the directory I am trying to ignore is the auto-save-list
directory in the root of the project, and I have run git rm --cached
but I still have multiple filed from that directory that show up as new when I go to make a commit. Similarly the files show up in my origin repo.
Can someone help me ignore the contents of the previously tracked file?
This should be enough:
No need for '
*
'If you still need the directory to be there (versioned in the Git repo, even though Git doesn't track an empty folder), add a dummy file in it.