Skip to content

RyuApps/prepush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prepush logo

prepush

Catches the steps you'd forget before git push — so 3am rollbacks become rare.

替你守住 git push 前那些容易漏掉的步骤——少几次凌晨 3 点紧急回滚的折腾。

Manage mode Push mode

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 全勾完才让推过去

Install / 安装

git clone https://github.com/RyuApps/prepush
cd prepush
make install

Installs 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。

Quick start / 快速上手

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。

Commands / 命令

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。

Contributing / 开发者文档

Building from source, project structure, how it works internally, and the config file schema — all in CONTRIBUTING.md.

从源码编译、项目结构、内部工作机制、配置文件 schema —— 都在 CONTRIBUTING.md 里。

License / 许可证

MIT License — free to use, modify, and distribute.

MIT 许可证——可自由使用、修改和分发。

About

Catches the steps you'd forget before git push — so 3am rollbacks become rare.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors