Hacker News new | ask | show | jobs
by black-tea 2714 days ago
Yeah, that's a very important point. Even changing the parent of a commit, that is, an edge in the graph, changes the hash of the commit. Therefore to change the parent (like in a rebase) you have to make a new commit, but the old commit doesn't go anywhere, you just can't see it because you have no reference to it any more.

Git will garbage collect these commits that can't be reached by any reference after a while, but usually that's long after you've forgotten they ever existed.