Catches the steps you'd forget before git push — so 3am rollbacks become rare.
替你守住 git push 前那些容易漏掉的步骤——少几次凌晨 3 点紧急回滚的折腾。
A native window pops up before git push and refuses to let the push through until you've ticked every item on the branch's checklist.
git push 时会先弹一个原生小窗,当前分支的 checklist 全勾完才让推过去。
git clone https://github.com/RyuApps/prepush
cd prepush
make installInstalls to /usr/local/bin/prepush. macOS 10.15+ or Windows 10+, Git 2.9+. Linux not supported yet.
装到 /usr/local/bin/prepush。需要 macOS 10.15+ 或 Windows 10+,Git 2.9+。暂不支持 Linux。
In any git repo / 在任何 git 仓库里:
prepush install # one-time per repo / 每个 repo 跑一次
prepush add "DB schema migration applied to prod?" # add an item / 给当前分支加一条
prepush # open the management UI / 打开管理窗口Then push as usual. If the current branch has items, a window pops up — tick everything, Confirm.
然后正常 git push。当前分支有 items 时会弹窗,勾完后 Confirm。
| Command | What it does / 用途 |
|---|---|
prepush install |
Wire prepush into the current repo (one-time) / 安装到当前 repo |
prepush uninstall |
Remove the hook (keeps .prepush.yaml) / 卸载 hook(保留 yaml) |
prepush / prepush check |
Open the management window for the current branch / 打开管理窗口 |
prepush add "<ask>" [url] |
Add an item to the current branch / 给当前分支加一条(位置参数) |
prepush add --ask "<ask>" --url "<url>" |
Same with explicit flags / 同上,命名参数形式 |
prepush check --json |
Print the matching checklist as JSON / JSON 输出,供脚本 / CI 用 |
prepush validate |
Validate .prepush.yaml syntax / 校验 yaml |
prepush version |
Print version / 打印版本号 |
git push --no-verify bypasses prepush exactly like any other Git hook. / 跟绕过其它 Git hook 一样可以绕过 prepush。
Building from source, project structure, how it works internally, and the config file schema — all in CONTRIBUTING.md.
从源码编译、项目结构、内部工作机制、配置文件 schema —— 都在 CONTRIBUTING.md 里。
MIT License — free to use, modify, and distribute.
MIT 许可证——可自由使用、修改和分发。


