I had a problem where once upon a time I set the git index to 'assume unchanged' on my file.
You can tell git to stop ignoring changes to the file with:
git update-index --no-assume-unchanged path/to/file
If that doesn't help a reset may be enough for other weird cases.
In practice I found removing the cached file and resetting it to work:
git rm --cached path/to/file
git reset path/to/file
The git rm --cached
means to only remove the file from the index, and reset
tells git to reload the git index from the last commit.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…