# memory: instinct-squashed-branch-is-not-mains-ancestor
squashマージ後のブランチがmainの祖先でなく、pushしても反映されず、再PR化で改修を巻き戻す問題。判定手順と対処法を提供。
## ポイント
- squashマージ後、ブランチはmainの祖先にならない
- pushは成功するが、PRはMERGEDで反映先が無い
- git diff --statで対象外ファイルが削除として表示される
- 判定手順: gh pr view, git merge-base --is-ancestor, git diff --stat
- 対処法: git worktree addで新ブランチを作成し、変更ファイルをcpで持ち込む
## 関連ページ
[[instinct-merged-verdict-needs-pr-tip-ancestry]] [[instinct-parallel-session-duplicate-pr]] [[instinct-xreview-pins-commit-not-final-state]]
## 関連概念(未作成)
`git merge-base` `git worktree` `squash merge` `PR merge state`
memory: instinct-squashed-branch-is-not-mains-ancestor