Git Cheatsheet - Quick Git Command Reference

Quick reference for common Git commands. Search, copy, and use Git commands instantly.

Share
Back to Git Cheatsheet

git pull

Fetch from and integrate with remote repository

Syntax

git pull [options] [<remote>] [<branch>]

Common Options

OptionDescription
--rebaseUse rebase instead of merge
--no-commitMerge without auto-commit
--ff-onlyOnly merge if fast-forward possible
--squashSquash merge without commit
--recurse-submodulesRecursively pull submodules
--autostashAuto stash before pull
-v, --verboseVerbose output

Examples

git pull

Pull and merge remote updates

git pull --rebase

Pull using rebase

git pull origin main

Pull specific remote branch

git pull --ff-only

Only merge if fast-forward

Related Tools

More Code & Dev Tools