GitCheatSheet.org logo
Home / How To

Fetch data from a remote repository

# Fetch from "origin" or the configured upstream branch
git fetch

# Fetch all branches from "my-remote-name" remote
git fetch my-remote-name

# Fetch "branch1" from "my-remote-name" remote
git fetch my-remote-name branch1

Downloads data from the remote repository into your local repository, without trying to merge anything with your work.