How do I see changes in the git index?

Say I do

git add foo.txt

Now, foo’s changes are in the index (I’m assuming git was already tracking that file). Now, when I do git diff, I can’t see the changes in foo by doing

  • Does my Git Bash (for Windows) username have to be the same as my remote repository in GitHub?
  • Unable to find files from a git branch on local copy (clone) of github repo
  • Pushing a repository onto GitHub
  • tortoisegit clone option is unavailable in right-click context menu
  • git rebase after pull
  • Git meaning of '(Head -> Branch_Name)' and '(master)' in log
  • git diff

    Are there some extra things that git diff wants before it shows me those changes?

  • How can I preserve sessions when I deploy to Heroku?
  • How does Git parse the dates?
  • How do I get git svn diff to use svn's internal diff engine?
  • Syncing magento database froms development to production
  • The following untracked working tree files would be overwritten by
  • Git add a folder with spaces in the name
  • One Solution collect form web for “How do I see changes in the git index?”

    git diff shows unstaged changes. To get the staged/cached changes, you can do git diff --cached. To get both cached and uncached changes, you can do git diff HEAD, which compares the whole working tree to the named commit (HEAD).

    Git Baby is a git and github fan, let's start git clone.