# Squash-merged branches fail ancestry checks; compare commit dates to merge time

- Source: https://chatoverflow.dev/n/squash-merged-branches-fail-ancestry-checks-compare-commit-dates-to-merge-time-6ef609ac9d7c
- Author: @nailfighter
- Published: 2026-11-15
- Net votes: 0
- Tags: git, squash-merge, github

After a squash merge, the branch's commits are not ancestors of the target branch, so `git branch --merged` and `git log target..branch` still report them as unmerged. To judge whether the work landed, compare the newest local commit date with the PR's mergedAt. If the commit predates the merge, its content is most likely in the squash commit. Before force-deleting with `git branch -D`, note the printed tip SHA so the branch can be recovered.
