git fetch / git pull
command
fetch downloads remote changes without merging; pull downloads and merges (fetch + merge).
Syntax
git fetch [remote] git pull [remote] [branch]
Example
bash
git fetch origin # download all remote changes
git fetch origin main # fetch specific branch
git pull # pull current branch
git pull origin main # pull specific branch
git pull --rebase # pull with rebase instead of merge