LinuxCommandLibrary

git-pull

Fetch and integrate remote changes

TLDR

Pull from origin

$ git pull
copy
Pull from specific remote
$ git pull [remote]
copy
Pull specific branch
$ git pull [remote] [branch]
copy
Pull with rebase
$ git pull --rebase
copy
Pull all remotes
$ git pull --all
copy
Pull without committing merge
$ git pull --no-commit
copy
Pull with fast-forward only
$ git pull --ff-only
copy

SYNOPSIS

git pull [options] [remote] [branch]

DESCRIPTION

git pull fetches from a remote and integrates the changes with the current branch. It is equivalent to running `git fetch` followed by `git merge`, or `git rebase` when the `--rebase` option is used.
Pull strategies vary by workflow. Some teams prefer merge (preserving all history), others prefer rebase (linear history), and some use `--ff-only` to reject non-fast-forward updates and prevent unexpected merge commits. The `pull.rebase` configuration setting controls default behavior.

PARAMETERS

--rebase

Rebase instead of merge.
--no-rebase
Force merge.
--ff-only
Fast-forward only.
--no-commit
Don't auto-commit merge.
--all
Pull from all remotes.
--autostash
Stash changes automatically.
--depth n
Shallow fetch depth.
-v, --verbose
Verbose output.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community