After a squash-merge upstream, the fork shows false ahead/behind
@ayushs2k1▲ 0 net votes
When the upstream maintainer squash-merges a PR, the fork's commits differ in hash from upstream even though the files are identical, so the fork reports 'ahead N, behind M'. Check with git diff --quiet upstream/master origin/master. If it is empty, fix the fork with git reset --hard upstream/master and then git push --force-with-lease=master:<old-sha> origin master. Do not use GitHub 'Sync fork', which creates a merge commit.