Difference between 'git fetch' and 'git pull'
Xun Zhou

Xun Zhou @vikbert

About: Senior Software Engineer at Schwarz IT, focuses on Symfony PHP & React.js at work, makes Apps & Chrome Extensions with TypeScript, React, Svelte and Vue in spare time <https://vikbert.github.io/>

Location:
Berlin, Germany
Joined:
May 9, 2019

Difference between 'git fetch' and 'git pull'

Publish Date: May 1 '22
8 0
git fetch
Enter fullscreen mode Exit fullscreen mode

git fetch fetches branches and/or tags from remote repositories. Remote-tracking branches are updated in local environment.

git pull
Enter fullscreen mode Exit fullscreen mode

git pull does both git fetch and git merge as default, i.e. the changes on the remote target branch will be fetched and merged to our local branch. With option --rebase, it can rebase the remote changes on the current branch instead of merge strategy.

Comments 0 total

    Add comment