How do i view the index version of a file before it is committed?
Posted
by lsiden
on Stack Overflow
See other posts from Stack Overflow
or by lsiden
Published on 2010-05-28T16:35:07Z
Indexed on
2010/05/28
16:42 UTC
Read the original article
Hit count: 140
git
I have just performed add --interactive, so the index version of some files is different than the working-directory versions. Instead of doing diff --cached, I want to actually dump the contents of each file in the index, but I can't find a command to do that. I should think that there would be something like "git show INDEX:filename...", but "INDEX" is not a valid object name.
I was able to do git ls --cached, then git show , but there should be a more straightforward method to see what you are committing.
© Stack Overflow or respective owner