> For the complete documentation index, see [llms.txt](https://yu-sun.gitbook.io/essential-git-for-scientists/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yu-sun.gitbook.io/essential-git-for-scientists/intermediate-concepts/fetch.md).

# Fetch

There are three main operations when dealing with a remote: **fetch**, **pull** and **push**. These operations are all at the branch level. In other words, there's always a source branch and a receiving branch.

Let's look at fetch first. If you look up the definition, it says "the process of downlinking changes from remote to the tracking branch is called a fetch". But what is a tracking branch?

### Tracking branches

When a fetch is done, the changes sets are downloaded from the remote and stored locally. These changes are NOT merged into your branch yet. Instead, Git stores them in a remote tracking branch. These branches can only be edited by Git during a inter-repo communication.&#x20;

<figure><img src="https://295116511-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDjWLei7crg3aIyHzeNL%2Fuploads%2FND1VM01BxZg1aDBrj2gg%2Fimage.png?alt=media&amp;token=5be81189-dc1e-47b9-ad77-0c7a83aa6911" alt="" width="563"><figcaption><p>Fetch syncs the tracking branch with the remote. Here <code>origin/dev</code> is the tracking branch for <code>dev</code> on the remote. But the local <code>dev</code> remains unchanged</p></figcaption></figure>

The tracking branch serves as a local mirror of the remote. In good practice, one should fetch regularly so that the tracking branches are updated frequently. This way, even you 're on a plane you can still merge some work.

In conclusion, a fetch syncs the tracking branch with the remote. At this point, these changes are not on your local branches yet. To include these changes, you have to do a merge.
