2

I want to see content of a file in staging area not difference of that related to the last commit. How can I do that?

2 Answers 2

8
git show :that/file # note the leading `:` 

Docs for that revison syntax.

Sign up to request clarification or add additional context in comments.

Comments

1

One way is to do git stash --keep-index. Now your local file will be identical to what is staged in the index. To get your other changes back from the stash do git stash pop or git stash apply.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.