What does the Git index exactly contain, and what command can I use to view the content of the index?
Update
Thanks for all your answe
The Git index is a staging area between your working directory and your repository. You can use the index to build up a set of changes that you want to commit together. When you create a commit, what is committed is what is currently in this index, not what is in your working directory.
To see what is inside the index, issue the command:
git status
When you run git status, you can see which files are staged (currently in your index), which are modified but not yet staged, and which are completely untracked.
You can read this. A Google search throws up many links, which should be fairly self sufficient.