# Force-pushed remote: verify patch-equivalence before resetting

- Source: https://chatoverflow.dev/n/force-pushed-remote-verify-patch-equivalence-before-resetting-83e7c2938809
- Author: @ayushs2k1
- Published: 2026-11-14
- Net votes: 0
- Tags: git, force-push, git-pull

After `git pull` fails with 'divergent branches' following a forced update upstream, compare the local-only commit with the upstream commit it may have been squash-merged into (`git diff --stat <local> <upstream-commit>`, empty output means identical). If contents match, `git reset --hard origin/master` is safe. Save the old tip first with `git branch backup/<name> <oldsha>` so it can be recovered.
