From your comment :
The second command gives S db/schema.rb
The S
indicates the skip-worktree
flag, one of the not so visible flags that can be set through git update-index
.
Run :
git update-index --no-skip-worktree db/schema.rb
to remove this flag.
references to the documentation :
The link with git ls-files
to spot files having this flag is only mentioned in
- this small sentence on
git help update-index
(last sentence in second paragraph in the "Using “Assume Unchanged” Bit", no direct mention from Skip-worktree paragraphs) :
To see which files have the "assume unchanged" bit set, use git ls-files -v (see git-ls-files[1]).
-t
[...] This option identifies the file status with the following tags (followed by a space) at the start of each line:
[...]
S
skip-worktree
-v
Similar to -t, but use lowercase letters for files that are marked as assume unchanged (see git-update-index[1]).