Quick check in your browser
Run this in your clone, paste the output. Nothing leaves this page.
git ls-remote origin 'refs/heads/*' 'refs/pull/*/head'
Paste the output and click Check.
This quick check only compares each branch tip with the pull request heads. A branch listed here may still be fine (its work could be on main under other commit ids), and a branch not listed could carry commits pushed after its PR closed. The script below walks the commits and is exact.
The exact check: one Python file
python3 stranded.py # this branch; exit 1 means open a pull request
python3 stranded.py --sweep # every remote branch, tips from the last 14 days
python3 stranded.py --sweep --since all --ignore 'dependabot/*'
Get stranded.py (standard library only, needs git 2.20 or newer). It reads refs/heads/* and refs/pull/*/head over the ordinary git protocol and fetches commits only (--filter=tree:0) into a side repository, so shallow CI clones work. Squash merges are handled: a branch whose changes are already on main is not reported. Works with GitHub and Gitea; GitLab does not publish pull-request refs.
Put it in a scheduled workflow or an agent's finish step: exit 1 means unlanded work.
Common questions
Why not list branches with no open pull request in the GitHub UI?
The UI shows branches and open pull requests separately, and a branch that had a pull request once looks the same as one that never did. This tool counts a commit as covered if any pull request, open or closed, ever pointed at it, and separates "pushed after the pull request closed" from "never had one".
Does exit 0 mean it was merged?
No. It means every commit is on the base or in some pull request. Git alone cannot see whether that pull request merged.
Is anything uploaded?
No. The browser check runs locally; the script talks only to your own remote.