Skip to main content

git-squash-merge-tree-hash-diagnosis

Diagnose and clean up a local branch that appears "N commits ahead of main" after its PR was squash-merged on GitHub, but whose work is actually fully integrated. Use when: (1) `git log main..HEAD` shows multiple commits but the matching PR is closed/merged on GitHub; (2) `git pull --ff-only` on `main` refuses with "Not possible to fast-forward" because local `main` accumulated orphan commits that were absorbed by the squash; (3) `git rebase main` would replay all branch commits and conflict because the squash commit's patch is the SUM of the branch's commits, not equivalent to any individual one; (4) `git log --cherry-mark --left-right main...HEAD` shows every branch commit as `>` (unique to HEAD) even though the work is in main; (5) you need to decide between "rebase + new PR" vs "delete merged branch" and the commit graph is misleading. The canonical signal is tree-hash equality: `git rev-parse HEAD^{tree}` vs `git rev-parse origin/main^{tree}` — if equal, every file is byte-identical and the branch is ful

跳到安装

来源信息

仓库
cajias/claude-skills
最近来源活动
2026年7月20日 07:29
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。