git-squash

Installation
SKILL.md

Git Squash

Pre-flight Checks

Before merging, validate the environment:

  1. Determine source branch — use the argument if provided (/git-squash-skill feature/my-branch), otherwise use the current branch.
  2. Verify not on main — if the source branch is main, abort with an error.
  3. Check for uncommitted changes — run git status --porcelain. If there are uncommitted changes, abort and suggest committing or stashing first.
  4. Verify branch exists — confirm the source branch exists locally (git rev-parse --verify <branch>).
  5. Verify divergence from main — run git log main..<branch> --oneline. If empty, abort — nothing to merge.

Switch to Main

git checkout main

If a remote origin exists, pull latest:

Installs
2
First Seen
Mar 4, 2026
git-squash — ralphcrisostomo/git-squash-skill