DELAPARRA
Index
Color
NL
Category: Git commands

git fetch

Explained by Updated

What is git fetch?

git fetch: Download remote commits without applying them to your working branch. git fetch downloads new commits, branches and tags from the remote, without changing your working files or current branch. Your local view of the remote, such as origin/main, is updated. That makes it safe. You can fetch at any time, then look at what changed with git log main..origin/main before deciding whether to merge or rebase.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about git fetch

What should you keep in mind with git fetch?

git pull is a fetch followed by a merge or rebase. Many experienced developers prefer to fetch first and integrate deliberately, especially when they have local work in progress. git fetch --prune also removes references to remote branches that were deleted, which keeps your branch list clean after colleagues delete their merged branches.

At a glance

CategoryGit commands
Explained by
Updated

More Git commands terms

All terms starting with G

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.