What does git pull --rebase do differently from a merging git pull?
- Fetches only and leaves your branch alone
- Discards local commits that are not pushed
- Creates a merge commit even when not needed
- Replays local commits on the fetched tip
After fetching, it rebases your unpushed commits on top of the upstream instead of merging, keeping history linear.
Play Git ▸