<p>What are the differences between <a href="https://git-scm.com/docs/git-pull" rel="noreferrer"><code>git pull</code></a> and <a href="https://git-scm.com/docs/git-fetch" rel="noreferrer"><code>git fetch</code></a>?</p>

In the simplest terms,
```
git pull
```
does a
```
git fetch
```
followed by a
```
git merge
```
.
```
git fetch
```
updates your remote-tracking branches under
```
refs/remotes/<remote>/
```
. This operation is safe to run at any time since it never changes any of your local branches under
```
refs/heads
```
.
```
git pull
```
brings a local branch up-to-date with its remote version, while also updating your other remote-tracking branches.
From the Git documentation for
```
git pull
```
:
In its default mode,
```
git pull
```
is shorthand for
```
git fetch
```
followed by
```
git merge FETCH_HEAD
```
.