Git · Sharing and syncing

git pull --rebase

Rebases local commits on top of the fetched branch.

Syntax
git pull --rebase

Example

Example
git pull --rebase origin main

More in this group

git fetch --prune git pull --ff-only git push --force-with-lease git push --set-upstream git push --tags git push origin --delete git request-pull

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course