2 ms·
> By your definition, if we delete a commit, the subsequent commits should remain unchanged And that's exactly what happens. On a rebase, the original commits
by TrianguloY 5y ago
> By your definition, if we delete a commit, the subsequent commits should remain unchanged
And that's exactly what happens. On a rebase, the original commits are not deleted, but the command creates new ones that matches the same diffs (unless there is a problem like an empty commit or a conflict).
Normally those unused commits are 'lost' because no branch/pointer are now pointing to it, unless you have another branch which does. Later the gc removes those orphaned commits (although I think you do can restore them before that happens).