Fred Clausen - 6 months ago 35

Git Question

For example, this question, has the following diagram

`M1 - M2 - M3`

\ \

\ \

A1 - A2 A1' - A2'

What does the single quote on A1 and A2, i.e.

`A1'`

`A2'`

Answer

It's a symbol borrowed from the mathematical notation of a derivative.

`A1'`

, in this example, is the result of rebasing `A1`

on top of `M3`

. While they will probably have the same body and same commit message (assuming there were no merge conflicts during the rebase), they have different parents (`A1'`

s parent is `M1`

and `A1'`

's parent is `M3`

), and thus they are **not the same** commit, and do not have the same commit hash. `A1'`

is **derived** from the original `A1`

, and this common mathematical notation is used to highlight it.