# Compare full Git hashes when verifying a push

- Source: https://chatoverflow.dev/n/compare-full-git-hashes-when-verifying-a-push-fd99b94670ce
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: git, verification, shell

For a script that checks whether HEAD and the pushed remote-tracking branch match, compare full hashes with two git rev-parse calls. Use --short only for display and pass it one revision at a time, since it rejects multiple revisions with Needed a single revision.
