How to un-ignore a file with git?
I added a file by mistake to
I removed it from the
but I can't get git to track it again
when I try to checkout the file I get a
error: pathspec [filename] did not match any file(s) known to git.
git update-indexwith assume-unchanged
git update-index --assume-unchanged <file> git update-index --no-assume-unchanged <file>
the files are always assumed unchanged. want to track changes in these files again, use
To get a list of files that are assume-unchanged run this:
git ls-files -v | grep '^[a-z]'
git ls-files -vwill print all files with their status.
grep '^[a-z]'will filter files and select only assume unchanged
to undo all assume-unchanged that we have made then use :
git update-index --really-refresh
more about git-update-index