What problem does it solve? After a --no-commit merge, cherry-pick, or revert, Git leaves pending state files (MERGE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD) in the repository. Pushing in this state produces empty or broken pull requests and confusing history. This Skill detects those pending operations and blocks the push before damage occurs. ## Core Features & Use Cases - Pending Operation Detection: Runs scripts/git/check_no_pending_merge.sh to inspect Git state files and returns exit codes 0-4 distinguishing clean merges, conflicted merges, cherry-picks, and reverts. - Pre-Push Hook Integration: Installs as a .githooks/pre-push hook so every push is automatically validated with GIT_PUSH_E_PENDING_* error codes. - History Surgery Exception: Documents when to temporarily disable hooks during active filter-repo or filter-branch rewrites using git -c core.hooksPath=/dev/null push --force-with-lease. - Use Case: You run git merge --no-commit feature-x, get interrupted, and later attempt git push. The guard exits with code 1 (GIT_PUSH_E_PENDING_MERGE_CLEAN), preventing an empty PR like the periscope PR #39 incident. ## Quick Start Ask the agent to check whether any pending merge, cherry-pick, or revert is blocking my git push and explain the exit code.