How does `Git rebase` work under the hood? (2020)
stackoverflow.com·3d·
Discuss: Hacker News
🌿git
Preview
Report Post

To that end, how does git rebase work under the hood?

It’s complicated. It’s particularly complicated because of history: it was originally a small shell script using git format-patch and git am, but that has some flaws, so it was rewritten as a much fancier set of shell scripts. These included a merge based back-end and an interactive back-end, splitting off the old am-based back-end into a third variant. Since then, it’s been rewritten yet again, in C, to use what Git calls the sequencer. The interactive code has been fancied up to allow re-performing merges as well. I’ll ignore these cases as they’re harder to draw and explain.

What plumbing commands does it use?

Now that it has been rewritten in C, it does not use any of them.

In the old days, the interactive bac…

Similar Posts

Loading similar posts...