Repo structure:
.gitignore
file1
file2
dir/
file3
<stuff>
I want to ignore everything inside dir
except file 3. Here's what I have in my .gitignore
file:
dir/*
!dir/file3
But this doesn't seem to work. git
still tries to index everything in dir
. How do I fix this?
UPDATE - Fixed after deleting the old .gitignore file, and making a new one. The new one was not made using > .gitignore
.