sounds like crazy town.
I just dont understand why someone would operate like this.
Lets assume you're squash merging your feature branchs to your local main, then you're raising the them as prs.
why would you do this?
Edit: Just to be clear, this is not a blemish on this project. More a lament and a wish someone would create such a thing for those of us forced to leave Gerrit behind for... GitHub. =/
Edit: apparently stacked PRs on GH are older than I thought; the readme references a 2024 blog post about it.
I used to work at companies where no one squashed their commits and the entire git logs were filled with 80% non-sense like "temp" or "bad" or "working" with the other 20% being coherent changes. What's the point of doing this I ask?
As they say in mtg, reading the card explains the card
It's equivalent to asking, "Why would you have more than one story in an epic (or task in a story)?".
Note: This is a community fork of adevinta/maiao. The original maintainers are no longer at Adevinta and the upstream repository is no longer actively maintained. This fork continues development under runetes/maiao.
Gerrit-style code review workflow for GitHub, GitLab, Gitea, Forgejo, Bitbucket Cloud, and Cursor Origin
Maiao brings the power of stacked pull requests (or merge requests) to your git hosting provider, enabling you to break large features into small, reviewable commits where each commit becomes its own PR/MR.
Maiao provides the git review command that:
git commit --fixup| Provider | PR/MR type | WIP/Draft | Native stacks |
|---|---|---|---|
| GitHub | Pull Request | API field | Yes (explicit registration) |
| GitLab | Merge Request | Draft: title prefix |
Yes (auto-detected from target branch, up to 20 MRs) |
| Gitea | Pull Request | WIP: title prefix |
No |
| Forgejo/Codeberg | Pull Request | WIP: title prefix |
No |
| Bitbucket Cloud | Pull Request | Not supported | No |
| Cursor Origin (beta) | Pull Request | API field | Yes (parentPullNumber) |
Maiao auto-detects the provider from your remote URL for known hosts (github.com, gitlab.com, codeberg.org, bitbucket.org, origin.cursor.com). For self-hosted instances, it prompts on first use and saves the choice to git config maiao.provider.
# Make multiple commits
git commit -m "Add user authentication"
git commit -m "Add authorization middleware"
git commit -m "Add admin endpoints"
# Create stacked PRs/MRs for all commits
git review
Result: Three PRs/MRs created and stacked:
Add user authentication → mainAdd authorization middleware → PR #1Add admin endpoints → PR #2git commit --fixup <sha>Maiao treats GitHub native stacks as a progressive enhancement. When two or more PRs are pushed, Maiao probes the Stacks API (cached for 24 hours) and registers the PRs as a stack if supported. On older GitHub Enterprise instances the feature is silently skipped — branch-based stacking still works as before.
# Control via git config (default: auto)
git config maiao.useNativeStack auto # use when available, skip otherwise
git config maiao.useNativeStack true # always register; warn if unavailable
git config maiao.useNativeStack false # disable entirely
Maiao implements the stacked diffs methodology. Learn more:
As Maiao encourages users to create smaller and nicer commits in their pull requests, it has been given the name of a tiny island:

Contributions are welcome! See CONTRIBUTING.md for details.
MIT License - see DISCLAIMER.md for details.