DEV Community

Discussion on: Fullstack Trivia: Can You Answer These Interview Questions in 5 Minutes?

Collapse
 
romank0 profile image
Roman Konoval

The answer to #1 is slightly incorrect. git fetch does download all the changes from the remote, but unlike git pull it does not incorporate them in your local branch.

Collapse
 
liaowow profile image
Annie Liao

Ah, I see. Thanks for clarifying. I recently saw a diagram that describes git pull as git fetch + git merge. That makes it easier for me to distinguish the two.

Collapse
 
bloodgain profile image
Cliff

Not only can it be described as such, it is exactly that. From the git pull doc page:
"In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD."