$ ./guess_the_languageGit
Git · medium · #55

What does git pull --rebase do differently from a merging git pull?

  1. Fetches only and leaves your branch alone
  2. Discards local commits that are not pushed
  3. Creates a merge commit even when not needed
  4. 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 ▸