修复
- 作者仓库星标 330
- 许可证 MIT
- 作者仓库 claude-skill-registry
- 领域
- 数据
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @majiayu000 · MIT
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Fixup
You are assisting with fixing up an existing commit using interactive rebase. Follow these steps:
## 1. Initial Assessment
- Run `git status` to see if there are uncommitted changes
- Run `git fetch origin` to get latest remote updates
- Display existing commits with `git log origin/main..HEAD --oneline`
## 2. Create Fixup Commit
If there are uncommitted changes:
1. Show the commit history
2. Ask user which commit hash to fixup (or identify it based on context)
3. Stage changes with `git add .` or ask which files to stage
4. Create a fixup commit:
```bash
git commit --fixup=<commit-hash>
```
## 3. Autosquash Rebase
Run non-interactive rebase with autosquash:
```bash
git rebase --autosquash origin/main
```
## 4. Commit Message Review
After rebase completes, verify the commit message matches the changes:
1. Display the rebased commit:
```bash
git show HEAD --stat
```
2. Compare the commit message body with the actual changes
3. If the message is inaccurate or incomplete:
- Draft a corrected commit message following the `commit-message` rule
- Explain what needs to be updated and why
- Update with `git commit --amend`
## 5. Post-Rebase Actions
After message review:
1. Display the final commit history:
```bash
git log origin/main..HEAD --oneline
```
2. Inform the user to run `/publish` to push changes and update the PR
## Key Principles
- Use `--fixup=<hash>` to create fixup commits targeting specific commits
- `--autosquash` automatically merges fixup commits during rebase
- Review commit messages after rebase - compare with actual changes
- Update messages with `git commit --amend` when they don't accurately reflect the changes
- Commit messages follow the `commit-message` rule
章节与文件索引
按说明文件中的顺序排列。
1. 初步评估
2. 创建修复提交
4. 提交消息审核
5. 变基后的操作
关键原则
文件/命令 -> git status · git fetch origin · git log origin/main..HEAD --oneline · git add . · commit-message · git commit --amend · /publish · --fixup=<hash>
内容校验值 -> 7bff6bfb1af5
当前原文的自动摘译,尚未人工审校。
1. 初步评估
运行
git status查看是否有未提交的更改 运行git fetch origin获取最新的远程更新 使用git log origin/main..HEAD --oneline显示现有提交2. 创建修复提交
如果有未提交的更改: 显示提交历史记录 询问用户要修复哪些提交哈希(或根据上下文识别它) 使用
git add .暂存更改或询问要暂存哪些文件 创建修复提交:4. 提交消息审核
变基完成后,验证提交消息是否与更改匹配: 显示变基提交:将提交消息正文与实际更改进行比较 如果消息不准确或不完整:按照
commit-message规则起草更正的提交消息5. 变基后的操作
消息审核后:显示最终提交历史:通知用户运行
/publish推送更改并更新 PR关键原则
使用
--fixup=<hash>创建针对特定提交的修复提交--autosquash在变基期间自动合并修复提交 变基后检查提交消息 - 与实际更改进行比较 当消息不能准确反映更改时,使用git commit --amend更新消息 提交消息遵循commit-message规则