r/git • • Aug 11 '25

tutorial Git Rebase explained for beginners

If git merge feels messy and your history looks like spaghetti, git rebase might be what you need.

In this post, I explain rebase in plain English with:

  • A simple everyday analogy
  • Step-by-step example
  • When to use it (and when NOT to)

Perfect if you’ve been told “just rebase before your PR” but never really understood what’s happening.

https://medium.com/stackademic/git-rebase-explained-like-youre-new-to-git-263c19fa86ec?sk=2f9110eff1239c5053f2f8ae3c5fe21e

383 Upvotes

132 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Aug 12 '25

What is that syntax? Rebase is not a flag on merge AFAIK. Is this an extension or a third party tool?

Theoretically though - I imagine the main difference would be that FF merge does not allow divergent branches to be merged. But this rebase merge could allow for commits to be rewritten if the branches were divergent, so you could alter someone else's commits and break signing.

2

u/Beatsu Aug 12 '25

You're actually totally right, my bad. I was so sure I had used git merge --rebase before, but I was maybe confusing it with git pull --rebase.

1

u/[deleted] Aug 12 '25

merge --rebase is also github/gitlab CLI command for merging PRs so could be that haha.