git pull

Fetches changes from the remote and merges them into the current branch. Equivalent to git fetch + git merge.

Syntax

git
git pull [remote] [branch]

Example

git
git pull                    # pull from upstream
git pull origin main        # explicit remote/branch
git pull --rebase           # rebase instead of merge
git pull origin main --no-ff