git-advanced

git-advanced is a skill for Claude Code, Codex from chaterm/terminal-skills. It costs 8 tokens per session (1,838 once invoked), scanned A, original, Apache-2.0.

A guide to advanced Git, the version-control system used to track code changes, including branches, rebasing, cherry-picking, and hooks.

In plain words
What is it for?
Use it to create and track branches, rebase work, combine or rename commits, apply individual commits, manage remote branches, and continue or cancel a rebase.
Why use it?
It gives developers commands for managing parallel work and cleaning or selectively applying commit history.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to create and track branches, rebase work, combine or rename commits, apply individual commits, manage remote branches, and continue or cancel a rebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaterm/terminal-skills/git-advanced
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chaterm/terminal-skills --skill git-advanced
Clone the repo
git clone --depth 1 https://github.com/chaterm/terminal-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-advanced

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaterm/terminal-skills/git-advanced.svg)](https://agentmods.dev/skills/chaterm/terminal-skills/git-advanced)
Your own site
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/git-advanced"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/git-advanced.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,838 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.01838
Opus 5 $0.00004 $0.00919
Sonnet 5 $0.00002 $0.00368
Haiku 4.5 $0.00001 $0.00184

Measured 8d ago against content hash 8e03913427be, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

git-advanced scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

devops/git-advanced/SKILL.md · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git 高级操作

概述

分支策略、rebase、cherry-pick、hooks 等高级 Git 技能。

分支管理

分支操作

# 创建分支
git branch feature/new-feature
git checkout -b feature/new-feature
git switch -c feature/new-feature

# 切换分支
git checkout main
git switch main

# 删除分支
git branch -d feature/merged
git branch -D feature/unmerged        # 强制删除

# 删除远程分支
git push origin --delete feature/old

# 重命名分支
git branch -m old-name new-name

# 查看分支
git branch -a                         # 所有分支
git branch -v                         # 带最后提交
git branch --merged                   # 已合并分支
git branch --no-merged                # 未合并分支

分支追踪

# 设置上游分支
git branch --set-upstream-to=origin/main main
git push -u origin feature/new

# 查看追踪关系
git branch -vv

Rebase 操作

基础 rebase

# 变基到 main
git checkout feature
git rebase main

# 交互式 rebase
git rebase -i HEAD~5
git rebase -i main

# 交互式命令
# pick   - 保留提交
# reword - 修改提交信息
# edit   - 修改提交内容
# squash - 合并到上一个提交
# fixup  - 合并但丢弃提交信息
# drop   - 删除提交

# 继续/中止 rebase
git rebase --continue
git rebase --abort
git rebase --skip

合并提交

# 合并最近 3 个提交
git rebase -i HEAD~3
# 将后两个 pick 改为 squash 或 fixup

# 修改历史提交信息
git rebase -i HEAD~3
# 将 pick 改为 reword

Cherry-pick

# 选择单个提交
git cherry-pick commit-hash

# 选择多个提交
git cherry-pick commit1 commit2 commit3

# 选择范围(不包含起始)
git cherry-pick start-commit..end-commit

# 不自动提交
git cherry-pick -n commit-hash

# 解决冲突后继续
git cherry-pick --continue
git cherry-pick --abort

Stash 暂存

# 暂存修改
git stash
git stash push -m "work in progress"

# 暂存包括未跟踪文件
git stash -u
git stash --include-untracked

# 查看暂存列表
git stash list

# 恢复暂存
git stash pop                         # 恢复并删除
git stash apply                       # 恢复但保留
git stash apply stash@{2}             # 指定暂存

# 查看暂存内容
git stash show -p stash@{0}

# 删除暂存
git stash drop stash@{0}
git stash clear                       # 清空所有

撤销操作

撤销工作区修改

# 撤销单个文件
git checkout -- file.txt
git restore file.txt

# 撤销所有修改
git checkout -- .
git restore .

Read the full file on GitHub · 343 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 343 lines · 8 tokens per session scan A 8e03913427be

Subscribe to this mod's changes

git-advanced is a skill published in the GitHub repository chaterm/terminal-skills (58 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 1,838 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

merge

Absorb one or more feature branches into the base branch. Recommends merge vs rebase per branch. On conflict, aborts that branch + surfaces the file list + stops. Resolution out of scope; routes to the harness-named conflict-resolution agent or the user.

RockyHong/super-bootstrap · 57 tokens

pre-publish-review

Nuclear-grade 12-agent pre-publish release gate. Runs /get-unpublished-changes to detect all changes since last npm release, spawns up to 10 ultrabrain agents for deep per-change analysis, invokes /review-work (orchestrator manual QA plus one gate reviewer) for holistic review, and 1 oracle for overall release…

code-yeongyu/oh-my-openagent · 161 tokens

publish

Publish oh-my-opencode to npm by triggering the GitHub Actions publish workflow and verifying its artifacts. Ship-only: never runs pre-publish-review or re-reviews merged code unless the user explicitly asks. Argument: . Triggers: publish, release, deploy, npm publish.

code-yeongyu/oh-my-openagent · 68 tokens

work-with-pr

Full PR lifecycle in a fresh task-owned git worktree: implement via the ulw-loop skill with mandatory evidence-bound manual QA → reviewer-readable English PR → verification loop (CI + Cubic, where Cubic is skipped only when its quota is exhausted) → merge by default → worktree cleanup. Decomposes one task into the…

code-yeongyu/oh-my-openagent · 211 tokens

lcx-contribute-bug-fix

Contribute a verified bug fix for LazyCodex, lazycodex-ai, omo-codex, bundled Codex skills, or upstream Codex CLI bugs. Opens a fork PR only for upstream openai/codex; LazyCodex-owned defects become a verified-fix issue on code-yeongyu/lazycodex (never a PR — that repo is a generated distribution mirror). Use when the…

code-yeongyu/oh-my-openagent · 129 tokens

git-master

Handles git work: atomic commits, rebase, squash, blame, bisect, reflog, and history questions. Use whenever a task needs a commit or a git-history investigation; skip for ordinary code edits.

code-yeongyu/oh-my-openagent · 46 tokens