3 ms·
Here is the paragraph that describes what rebase does: > This operation works by going to the common ancestor of the two branches (the one you’re on and the on
by hibbelig 6y ago
Here is the paragraph that describes what rebase does:
> This operation works by going to the common ancestor of the two branches (the one you’re on and the one you’re rebasing onto), getting the diff introduced by each commit of the branch you’re on, saving those diffs to temporary files, resetting the current branch to the same commit as the branch you are rebasing onto, and finally applying each change in turn.
Is "applying the diff to a different parent" not a good way to describe this?
- tlb 6y agoYou're using the word 'diff' for 2 different things: - an efficient way to store 2 very similar files - the minimal set of changes made by a programmer to a file. Subversion uses the same diff algorithm for these 2 functions, which is why people conflate them. But git uses different algorithms. The first one (which it calls deltas) are optimized for speed and compression ratio. The second set of algorithms (you can choose from a few, some of which are better at identifying rearrangements of large blocks of text) are optimized for merging 2 programmer's changes without conflicts.