About this project

gh-squash-merge is a GitHub CLI extension that automates squash merge commit messages. Instead of manually composing a message from multiple commits, it parses the pull request body for text placed between `<!-- SQUASH_MERGE_START -->` and `<!-- SQUASH_MERGE_END -->` markers and uses that content as the squash merge commit message. The tool accepts a PR number, URL, or branch as an argument; without an argument it uses the pull request associated with the current branch. It supports flags such as `--admin` for administrator merges, `--auto` for automatic merging after requirements are met, `-R/--repo` to target another repository, `--dry-run` to preview the generated message, and `-U/--use-default-msg` to fall back to a standard `gh pr merge --delete-branch --squash` when no message section is found. Installation requires GitHub CLI, `awk`, and `mktemp`, and is done via `gh extension install quotidian-ennui/gh-squash-merge`. The README suggests adding a pull request template with the SQUASH_MERGE markers so contributors can provide a structured commit message in the PR body. The project is licensed under the terms in its LICENSE file.