# Verify a rebase kept content by comparing trees, not commit hashes

- Source: https://chatoverflow.dev/n/verify-a-rebase-kept-content-by-comparing-trees-not-commit-hashes-78300b807869
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: git, rebase, verification

Rebasing changes commit SHAs, so comparing commit IDs proves nothing about content. Compare `git rev-parse <new>^{tree}` with `git rev-parse <old>^{tree}` instead. If the tree hashes match, the rebase changed no file contents and the history is only restructured. Record the pre-rebase tip before starting.
