Token导航 LogoToken导航

Agent Skill · 研究检索

git-advanced(git 高级)

git-advanced 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

git-advanced 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,674 个 Skill 里排第 68,654。

总安装 225周安装 9GitHub Stars 9下载 73核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-advanced(git 高级)
来源仓库:https://github.com/autumnsgrove/claudeskills
仓库路径:skills/git-advanced
安装命令:
npx skills add https://github.com/autumnsgrove/claudeskills --skill git-advanced
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/autumnsgrove/claudeskills --skill git-advanced

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

git-advanced 掌握高级 Git 操作,如交互式变基、二分查找与历史重写,适合复杂版本控制场景。适用于清理提交历史、解决合并冲突或恢复丢失 commit。支持 bisect 定位 bug、rebase 整理分支与 safe history rewrite。使用前需备份重要分支,避免对共享历史进行不可逆操作。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/git-advanced

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/autumnsgrove/claudeskills --skill git-advanced;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

git-advanced 怎么安装?

在终端执行 npx skills add https://github.com/autumnsgrove/claudeskills --skill git-advanced。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

git-advanced 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

git-advanced 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

git-advanced 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

git-advanced 用的人多吗?

公开数据是累计安装 225 次,近一周安装 9 次,下载 73 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

git-advanced 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
git-advanced

git 高级 · 本页

2259需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Advanced Git Operations

Overview

Master advanced Git workflows for complex version control scenarios. This skill covers sophisticated operations beyond basic commits and merges, including interactive rebasing, advanced conflict resolution, history manipulation, and strategic branch management.

Use this skill when you need to:

  • Clean up messy commit history before code review
  • Resolve complex merge conflicts strategically
  • Hunt down bugs with binary search (bisect)
  • Recover lost commits or undo mistakes
  • Implement team branching strategies
  • Rewrite history safely

Core Capabilities

Interactive Rebasing

  • Reorder commits for logical history
  • Squash multiple commits into one
  • Edit commit messages retroactively
  • Split commits into smaller pieces
  • Remove unwanted commits from history

Conflict Resolution

  • Strategic merge conflict handling
  • Three-way merge understanding
  • Ours vs theirs strategy selection
  • Conflict marker interpretation
  • Partial file staging during conflicts

Git Bisect

  • Binary search for bug introduction
  • Automated bisect with scripts
  • Good/bad commit identification
  • Efficient debugging of regressions

History Manipulation

  • Amend commits safely
  • Filter-branch operations
  • BFG Repo-Cleaner for large files
  • Rewrite history with caution
  • Preserve attribution and dates

Branch Strategies

  • Git Flow workflow
  • Trunk-based development
  • Feature branch workflows
  • Release branch management
  • Hotfix procedures

Quick Command Reference

Interactive Rebase

# Rebase last 5 commits interactively
git rebase -i HEAD~5

# Rebase onto main branch
git rebase -i main

# Continue after resolving conflicts
git rebase --continue

# Abort and return to original state
git rebase --abort

Conflict Resolution

# Accept ours (current branch)
git checkout --ours <file>

# Accept theirs (incoming branch)
git checkout --theirs <file>

# List conflicted files
git diff --name-only --diff-filter=U

# Mark as resolved
git add <file>

Git Bisect

# Start bisect session
git bisect start
git bisect bad
git bisect good <commit-hash>

# Automate with test script
git bisect run ./test-script.sh

# End bisect session
git bisect reset

Cherry-Pick

# Apply specific commit
git cherry-pick <commit-hash>

# Cherry-pick without committing
git cherry-pick -n <commit-hash>

# Cherry-pick range of commits
git cherry-pick A^..B

Reflog Recovery

# View reflog history
git reflog

# Recover lost commit
git checkout -b recovery <commit-hash>

# Reset to previous state
git reset --hard HEAD@{2}

Core Workflows

1. Interactive Rebase Workflow

When to Use:

  • Clean up messy commit history before pushing
  • Combine "WIP" or "fix typo" commits
  • Reorder commits for logical progression
  • Split large commits into focused changes

Steps:

# 1. Start interactive rebase for last N commits
git rebase -i HEAD~5

# Interactive editor opens with commit list
# Modify commands to reorganize history

Rebase Commands:

  • pick (p): Keep commit as-is
  • reword (r): Keep commit, edit message
  • edit (e): Keep commit, stop to amend
  • squash (s): Combine with previous commit, keep message
  • fixup (f): Combine with previous commit, discard message
  • drop (d): Remove commit entirely

Example:

# Before
pick abc1234 Add feature X
pick def5678 Fix typo
pick ghi9012 WIP commit
pick jkl3456 Update documentation

# After cleanup
pick abc1234 Add feature X
fixup def5678 Fix typo
drop ghi9012 WIP commit
reword jkl3456 Update documentation

Safety Tips:

  • Never rebase commits already pushed to shared branches
  • Create backup branch: git branch backup
  • Use git reflog if something goes wrong
  • Force push carefully: git push --force-with-lease

For detailed examples and advanced techniques, see examples/interactive_rebase.md.

2. Conflict Resolution Workflow

Understanding Conflict Markers:

<<<<<<< HEAD (Current Change)
Your code from current branch
=======
Their code from merging branch
>>>>>>> branch-name (Incoming Change)

Resolution Process:

# 1. Identify conflicts
git status

# 2. Choose resolution strategy:

# Strategy A: Manual resolution
vim <file>  # Edit between markers
git add <file>

# Strategy B: Accept one side
git checkout --ours <file>    # Keep yours
git checkout --theirs <file>  # Keep theirs
git add <file>

# Strategy C: Use merge tool
git mergetool

# 3. Continue operation
git merge --continue
# or
git rebase --continue

Three-Way Diff:

# Show what YOU changed
git diff --ours <file>

# Show what THEY changed
git diff --theirs <file>

# Show common ancestor
git diff --base <file>

For common conflict patterns and solutions, see examples/conflict_resolution.md.

3. Git Bisect for Bug Hunting

Scenario: Bug exists in current version, find which commit introduced it.

Manual Bisect:

# 1. Start bisect
git bisect start

# 2. Mark current state as bad
git bisect bad

# 3. Mark known good commit
git bisect good v1.0.0

# 4. Test the code (Git checks out middle commit)
# Run app, check if bug exists

# 5. Mark result
git bisect bad   # If bug exists
git bisect good  # If bug doesn't exist

# Repeat until Git finds first bad commit

# 6. End bisect
git bisect reset

Automated Bisect:

# Create test script (test.sh)
#!/bin/bash
npm test
exit $?

# Run automated bisect
git bisect start
git bisect bad
git bisect good v1.0.0
git bisect run ./test.sh

# Git automatically finds bad commit
git bisect reset

4. Branch Management

Quick Cleanup:

# Use helper script
bash scripts/git_helper.sh cleanup-branches

# Or manual cleanup
git branch --merged main | grep -v "\*\|main\|develop" | xargs git branch -d
git fetch --prune

Stale Branch Detection:

# Show branches with last commit date
for branch in $(git branch -r | grep -v HEAD); do
    echo -e "$(git show --format="%ci %cr" $branch | head -n 1)\t$branch"
done | sort -r

For detailed branch management strategies, see references/branch-management.md.

5. Reflog Recovery

Recover Deleted Branch:

# View reflog
git reflog

# Find commit where branch was deleted
# Restore branch
git checkout -b feature-x <commit-hash>

Undo Bad Reset:

# Accidentally ran: git reset --hard HEAD~5

# View reflog
git reflog

# Restore previous state
git reset --hard HEAD@{1}

Recover Lost Commits:

# Find dangling commits
git fsck --lost-found

# Cherry-pick recovered commit
git cherry-pick <lost-commit-hash>

For comprehensive recovery techniques, see references/reflog-recovery.md.

Branch Strategy Implementation

This skill supports implementing various branching strategies. Choose based on your team's needs:

Git Flow

Best for: Projects with scheduled releases, multiple production versions

Branch Types:

  • main: Production-ready code
  • develop: Integration branch
  • feature/*: New features
  • release/*: Release preparation
  • hotfix/*: Production fixes

Quick Start:

# Feature development
git checkout develop
git checkout -b feature/user-auth
# Work on feature
git checkout develop
git merge --no-ff feature/user-auth

Trunk-Based Development

Best for: Continuous deployment, fast-moving teams

Principles:

  • Single main branch
  • Short-lived feature branches (< 1 day)
  • Frequent integration
  • Feature flags for incomplete work

Quick Start:

# Create short-lived branch
git checkout main
git checkout -b feature/quick-fix
# Work and merge same day
git checkout main
git merge feature/quick-fix

For complete branch strategy workflows, see examples/branch_strategies.md.

Best Practices

Before Rebase

  • Create backup branch: git branch backup
  • Ensure working directory is clean: git status
  • Know your commit history: git log --oneline
  • Never rebase public/shared branches

During Conflicts

  • Understand both sides of the conflict
  • Test thoroughly after resolution
  • Use meaningful merge commit messages
  • Document complex resolutions

Branch Management

  • Delete merged branches promptly
  • Use descriptive branch names: feature/user-login
  • Keep branches focused and short-lived
  • Sync with main branch regularly

History Hygiene

  • Squash "fixup" commits before pushing
  • Write clear, descriptive commit messages
  • Keep commits atomic (one logical change)
  • Use conventional commit format when possible

For comprehensive best practices, see references/best-practices.md.

Troubleshooting

Rebase Conflicts

# If conflicts are too complex
git rebase --abort

# Start over with different approach
git merge --no-ff <branch>

Lost Commits

# Always check reflog first
git reflog

# Find and recover
git checkout -b recovery <commit-hash>

Detached HEAD State

# Create branch from detached HEAD
git checkout -b new-branch-name

# Or go back to branch
git checkout main

Failed Push After Rebase

# Only if you're certain and branch is not shared
git push --force-with-lease

# Safer: Create new branch
git checkout -b feature-v2
git push origin feature-v2

For detailed troubleshooting, see references/troubleshooting.md.

Additional Resources

Detailed Guides

  • examples/interactive_rebase.md: Step-by-step rebase examples with scenarios
  • examples/conflict_resolution.md: Common conflict patterns and solutions
  • examples/branch_strategies.md: Complete Git Flow and trunk-based workflows

Reference Documentation

  • references/branch-management.md: Branch cleanup automation and strategies
  • references/reflog-recovery.md: Recovery techniques and history rewriting
  • references/best-practices.md: Comprehensive best practices and quality standards
  • references/troubleshooting.md: Common issues and emergency recovery

Helper Scripts

  • scripts/git_helper.sh: Branch cleanup and conflict resolution utilities

Quick Reference Commands

Must-Know Commands

# Interactive rebase
git rebase -i HEAD~N

# Abort operations
git rebase --abort
git merge --abort
git cherry-pick --abort

# View history
git log --oneline --graph --all
git reflog

# Conflict resolution
git checkout --ours <file>
git checkout --theirs <file>

# Recovery
git fsck --lost-found
git reflog

# Cleanup
git branch --merged | xargs git branch -d
git fetch --prune

Safety First

  1. Always backup before history rewrite: git branch backup
  2. Never force push to shared branches: Use --force-with-lease
  3. Test after conflicts: Don't assume resolution is correct
  4. Document complex operations: Leave comments in merge commits
  5. Use reflog: It's your safety net for 30+ days

Master these advanced Git operations to maintain clean history, resolve conflicts efficiently, and manage complex development workflows with confidence.

平台分布

windsurf

28.38%
按下载量换算21

OpenCode

22.32%
按下载量换算16

Codex

17.5%
按下载量换算13

Claude Code

11.33%
按下载量换算8

Antigravity

6.37%
按下载量换算5

Gemini CLI

3.12%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills