Git-knife是一款开源桌面GUI工具,让用户能够像编辑电子表格一样批量修改Git提交的关键元数据[1]。该工具支持编辑提交消息、作者名称及邮箱、作者日期、提交者日期和提交者名称及邮箱等信息[1]。
这款工具填补了现有软件的功能空白[1]。传统GUI工具如GitKraken和Sublime Merge无法编辑提交日期和提交者身份,而命令行工具如git-filter-repo和git commit-tree虽然功能完整但缺乏图形界面[1]。Git-knife提供了批量查找替换功能,支持正则表达式和字面量搜索[1],同时在每次重写前自动创建备份ref,用户可一键恢复[1]。工具还会提醒用户是否修改了已推送的历史记录[1]。
使用Git-knife需要git 2.x、Node.js及pnpm,以及Rust stable环境[1]。该工具仅重写本地分支而不涉及远程仓库,推送操作由用户显式执行[1]。值得注意的是,合并提交在当前版本中被锁定,不可进行编辑[1]。
Git-knife, an open-source desktop GUI tool, enables users to edit Git commit metadata in bulk as though working within a spreadsheet [1]. The tool addresses a gap in existing version control software by allowing batch modifications to commit messages, author names and email addresses, author dates, committer dates, and committer identities—capabilities that graphical tools like GitKraken and Sublime Merge lack, while command-line alternatives such as git-filter-repo and git commit-tree lack a user-friendly interface [1].
The application supports batch find-and-replace operations using both regular expressions and literal text matching [1]. It automatically generates backup references before each rewrite, allowing users to restore changes with a single click [1]. The tool also alerts users when they have modified pushed history, protecting against accidental remote repository corruption [1]. Merge commits remain locked in the current version and cannot be edited [1]. The software operates exclusively on local branches without affecting remote repositories, with all push operations requiring explicit user action [1].
System requirements include Git 2.x, Node.js with pnpm, and a stable Rust environment [1].