Hacker News new | ask | show | jobs
by ktosiek 5138 days ago
The history for every change in existing branches is recorded - if you remove a branch you either want to discard whatever changes where there or you merged it into another one and don't need it tagged as separate branch.

Commits in git are reference counted - the ones that have no references to them are removed, (and having a branch or other commit pointing to yours both count as references) and the ones that can be reached from tops of branches or tags are kept.