agentic git commit generate tool
fastgit commit: AI 提交流程(保留原行为)fastgit commit ai: AI 提交流程显式入口(新增)fastgit changelog init: 初始化.version/changelog模板,适配任意项目仓库fastgit changelog draft: 使用 Copilot 根据当前改动更新Unreleased.mdfastgit changelog release: 将Unreleased.md落版为版本文件,并可同步推进.version/VERSIONfastgit docs init: 初始化文档维护用的 prompt / instruction 模板fastgit pull: 拉取当前分支(支持--all)fastgit pull --hard: 强制与远端同步(fetch + reset --hard)fastgit push: 推送当前分支(支持--all/--force)fastgit worktree: 列出当前仓库 worktreefastgit worktree create <issue|branch> [--base <branch>]: 创建 worktreefastgit worktree remove <issue|branch>: 删除 worktreefastgit worktree remove --path <worktree-path>: 按路径删除 worktreefastgit ggc list: 查看统一命令面(ggc 风格)fastgit ggc <command ...>: 执行统一命令,例如fastgit ggc status shortfastgit ggc/fastgit ggc interactive: 进入交互模式(增量搜索 + workflow)fastgit ggc path: 查看当前ggc.yaml的实际路径(按 OS/XDG 规则)
fastgit 现在支持为仓库初始化一组可直接复用的 Copilot prompt / instruction 模板,适合把常用工作流沉淀到项目里,而不是只存在聊天上下文中。
- 初始化:
fastgit changelog init - 生成后会创建:
.version/changelog/*.github/prompts/changelog.prompt.md.github/instructions/changelog.instructions.md.github/instructions/release.instructions.md
适合场景:
- 维护
Unreleased.md - 准备版本落版
- 统一 changelog 分类与发布流程
- 初始化:
fastgit docs init - 生成后会创建:
.github/prompts/documentation.prompt.md.github/prompts/commit-message.prompt.md.github/instructions/documentation.instructions.md
适合场景:
- 更新
README.md - 同步
docs/** - 维护
example/**/README.md - 生成或沉淀提交信息 / 提交流程 prompt 模板
- 让文档写作遵循统一中文技术文风与结构规范
仓库中还可以维护提交辅助 prompt,例如:
.github/prompts/commit-message.prompt.md
当前这类 prompt 可用于:
- 基于 staged / working tree 改动生成提交信息
- 按模板约束执行本地提交
- 按模板约束继续推送到远程(如果 prompt 明确要求)
建议:把“生成建议”和“执行提交”区分成不同 prompt,便于在不同风险场景下选择更稳妥的工作流。
fastgit ggc status|status shortfastgit ggc add <file|.>fastgit ggc commit <message>fastgit ggc log simple|graphfastgit ggc diff|diff staged|diff unstagedfastgit ggc branch current|list local|list remote|checkout <name>|checkout remote <name>|create <name>|delete <name>fastgit ggc fetch|fetch prunefastgit ggc pull current|pull rebasefastgit ggc push current|push forcefastgit ggc rebase <upstream>|continue|abort|skipfastgit ggc tag list|show <tag>fastgit ggc remote list
- 搜索模式(默认)
- 输入字符:实时 fuzzy 过滤命令
↑/↓或Ctrl+N/P:移动选中Enter:执行当前命令Tab:将当前命令加入当前 workflowCtrl+T:切换到 workflow 模式Ctrl+C:退出
- workflow 模式
n:新建 workflowd/Ctrl+D:删除当前 workflowc:清空当前 workflowCtrl+N/P:切换 workflowx或Enter:执行当前 workflowCtrl+T:返回搜索模式
对于带占位参数的命令(如
<name>),执行时会自动提示输入参数。
- workflow 会持久化到:
<XDG 配置目录>/fastgit/ggc.yaml- macOS 常见为:
~/Library/Application Support/fastgit/ggc.yaml - Linux 常见为:
~/.config/fastgit/ggc.yaml
- macOS 常见为:
- 每次进入
fastgit ggc交互模式会自动加载上次 workflow - 在交互模式里对 workflow 的新增/删除/清空会自动保存
ggc.yaml 支持两种 alias:
- 单条 alias(字符串)
- 序列 alias(字符串数组,按顺序执行)
示例:
aliases:
st: "status short"
ci: "commit {0}"
quick:
- "status"
- "add ."
- "commit {0}"说明:
{0}、{1}... 表示位置参数- 例如:
fastgit ggc ci "fix typo" - 例如:
fastgit ggc quick "chore: update" fastgit ggc list会同时显示内置命令与 alias
- OPENAI_API_KEY
- OPENAI_BASE_URL, default: https://api.deepseek.com/v1
- OPENAI_MODEL, default: deepseek-chat