I was going through git scm book and reading the Pulling section on this page. It says:
While the git fetch command will fetch down all the changes on the server that you don’t have yet, it will not modify your working directory at all. It will simply get the data for you and let you merge it yourself.
I have used 'git fetch upstream' and it does merge all the changes existing in the remote branch to my local branch, which according to me updates the working directory as well. But then it contradicts the above statement.
I am confused and not able to get my head around it. Can someone please explain?
I have already gone through the links which are marked as duplicate. I may as well be dumb but I didn't get any clarity of the above statement from those answers. Please help.
Update
Here's the command that I ran and its output:
bash-3.2$ git fetch upstream
remote: Counting objects: 108, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 108 (delta 77), reused 77 (delta 77), pack-reused 23
Receiving objects: 100% (108/108), 25.92 KiB | 0 bytes/s, done.
Resolving deltas: 100% (79/79), completed with 31 local objects.
From <git-repo-url>
a82339d..9844eeb master -> upstream/master
802bae5..6c84bfb <some-branch> -> upstream/<some-branch>