跳到正文
TakoAPI
返回技能列表

git-workflows

由 gitgoodordietrying 提供

Git & GitHub
7.6k下载量由 clawskills.sh 提供
4星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Advanced git operations beyond add/commit/push.

描述

该技能的功能

Covers advanced git operations beyond the basics: interactive rebase, bisect, worktrees, reflog recovery, subtrees, submodules, sparse checkout, conflict resolution, and cherry-picking. Aimed at developers who need precise control over commit history and multi-branch workflows.

Covers the full range of recovery and history-rewriting operations that most git tutorials skip, including automated bisect and rerere, which eliminate repetitive manual steps.

何时使用

  • Squashing fix commits before merging a PR
  • Pinpointing which commit introduced a regression
  • Reviewing a PR in a separate worktree without stashing current work
  • Recovering commits after an accidental reset --hard
  • Syncing a shared library into a repo via subtree

示例工作流

输入

User asks: find which commit broke the login redirect test

智能体
  1. 1

    Run git bisect start and mark current HEAD as bad

  2. 2

    Mark a known-good tag or commit with git bisect good v1.2.0

  3. 3

    Write a test script that exits 0 when the bug is absent and 1 when present

  4. 4

    Run git bisect run ./test-for-bug.sh to automate binary search

  5. 5

    Review the identified bad commit with git show and reset with git bisect reset

输出

Git identifies the exact commit SHA that introduced the regression

安装

clawhub install gitgoodordietrying/git-workflows

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接