Git: What EXACTLY does "git pull" do?

Viewed 8535

I know that git pull is actually a combination of git fetch and git merge, and that it basically brings in the repository as it is in the remote repository.

  1. But still, does it mean that after git pull my working tree will be identical to the remote repo?
  2. I found some cases that doing git pull doesn't change anything in my local repo or create any new commit. What is the explanation for this?
  3. Does it make sense that git pull makes changes at the index only?
  4. If it does, how can I make the changes at index move forward to the working tree?
4 Answers
Related