# Git Fetch

> Getting the new commits from the remote. Your own files stay just as they were.

**Field:** Software Development  
**Category:** Version Control  
**Also known as:** Fetch

## Think of it like

Think of it like checking the post box. You see the new letters, but you have not opened them yet.

## Definition

To fetch is to download new commits from a remote. Git stores them as a separate copy, like origin/main, beside your branch. You can then look at what changed before you mix it in. Nothing in your working files moves until you merge or rebase. A fetch is always safe to run.

## Example

Jack fetches before lunch. Git tells him main is one commit behind, so he reads Emma's change before he pulls it.

## Example code

```console
$ git fetch
From https://example.com/ada/shop
   68ba79c..643e9b2  main       -> origin/main
$ git status
On branch main
Your branch is behind 'origin/main' by 1 commit, and can be fast-forwarded.
```

One new commit arrived, but Jack's own files have not changed.

## Why it matters

Fetching lets you look before you leap. You see what others did without risking your own work.

## Common mistake

Thinking a fetch updates your files. It only downloads; you still need to merge.

## Three principles

- **Download only.** Your files stay as they are.
- **Look first.** See changes before mixing them in.
- **Always safe.** It cannot break your work.

## Related terms

- [Git Pull](https://learn.benibix.com/term/development/pull)
- [Remote Repository](https://learn.benibix.com/term/development/remote)
- [Merge](https://learn.benibix.com/term/development/merge)
- [Git Push](https://learn.benibix.com/term/development/push)

## Told apart from

- [Git Fetch vs Git Pull](https://learn.benibix.com/compare/git-fetch-vs-git-pull): A fetch only downloads new commits and leaves your files alone. A pull downloads them and merges them in, in one step.

## Taught in

- [Git Clone, Push and Pull](https://learn.benibix.com/learn/development-version-control/git-clone-push-and-pull): Git and GitHub, 9/13

---

Source: https://learn.benibix.com/term/development/fetch
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
