Whether we use checkout or reset, when we jump from commit to commit, the index keeps matching the now-current commit.
When I ask people how to see what files are staged in the index for the now-current commit, they tell me: git ls-files -s
But git ls-files -s
does not seem to be what I am looking for.
This command just lists the tracked files of a sub-tree with the current directory being the root of it. If I move to another directory, the output of git ls-files -s
changes!
Really, is there a command out there that will solidly give me the tracked files for a commit after I jump from some other commit to it?