Skip to main content

git-rebase

Use when: clean up or reorder commits with rebase while keeping history safe and reviewable.

来源信息

仓库
kimtth/agent-skill-100-lines-or-less
最近来源活动
2026年6月26日 02:15
检测到的 SKILL.md 语言
英语
星标
2
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
git-rebase
description
Use when: clean up or reorder commits with rebase while keeping history safe and reviewable.
Goal: a clear, linear history without losing work or rewriting shared commits. Use for: - tidying a branch before opening a pull request - squashing, reordering, or editing local commits - updating a feature branch onto the latest base Workflow: 1. Confirm the commits are not yet shared, or coordinate first. 2. Rebase interactively to squash, reword, or reorder. 3. Update onto the base branch to incorporate new changes. 4. Resolve conflicts commit by commit. 5. Run tests after rebasing, before pushing. 6. Force-with-lease to push a rewritten branch safely. Operations: - squash fixups into the commit they belong to - reword messages for clarity - reorder to tell a logical story - drop dead or accidental commits Rules: - never rebase commits others have already based work on - use --force-with-lease, never plain --force - keep each commit building and passing where feasible - back up the branch before a risky rebase
在 GitHub 查看