本文へ移動
cccskills
無料GitHub で公開

ls-git-merge-rebase

Advanced git operations beyond add/commit/push. Use when rebasing, bisecting bugs, using worktrees for parallel development, recovering with reflog, managing subtrees/submodules, resolving merge conflicts, cherry-picking across branches, or working with monorepos.

日本語の概要は準備中です。原文の説明を表示しています。

インストール方法を見る

含まれるファイル(5)

  • SKILL.md4.3 KB
  • references/rebase-and-bisect.md3.1 KB
  • references/repo-structure-and-conflicts.md4.4 KB
  • references/tags-releases-and-tips.md1.7 KB
  • references/worktrees-recovery-and-history.md4.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Git Workflows

Use this skill for advanced Git operations that can rewrite history, move work between branches, recover lost commits, or manage large and multi-repository codebases. Keep this file as the activation and safety workflow; open the references only for the procedure you need.

When to Use

  • Cleaning up commit history before merging.
  • Finding which commit introduced a bug.
  • Working on multiple branches at the same time.
  • Recovering lost commits, dropped stashes, or mistaken resets.
  • Cherry-picking commits across branches or forks.
  • Managing subtrees, submodules, or sparse checkouts.
  • Resolving complex merge or rebase conflicts.
  • Inspecting history with blame, pickaxe, or file-following log commands.

Safety Workflow

  1. Inspect the repository before changing it:
git status --short --branch
git remote -v
git branch --show-current
  1. Identify whether the target branch is shared. Do not rebase, amend, reset, or force-push shared history unless the user explicitly asks for that operation.
  2. Preserve unrelated work. If the worktree is dirty, only stage or modify files that belong to the task.
  3. Before every git reset --hard, require a clean worktree. Preserve desired staged, unstaged, and relevant untracked work first with an approved WIP commit, patch, stash (use -u when needed), or separate worktree. A backup branch or tag preserves only commits; it does not preserve uncommitted work.
git status --short
git stash push -u -m "WIP before recovery"
git branch backup/before-recovery
  1. Prefer non-interactive commands when automating. Use interactive rebase only when the user can review the intended commit list or the change is clearly local and scoped.
  2. After each operation, re-check status and confirm the branch, staged files, and diff match the requested outcome.

Rule ownership

This skill owns advanced Git operations and traceability behavior. GIT_TRACEABILITY.md is the public reference; use this skill for branch, history, worktree, release-tag, and checkpoint decisions.

  • Preserve unrelated dirty-tree work.
  • Record commit hashes or branch names when a decision depends on a past state.
  • Use ls-git-broken-state-recovery for broken worktree/index/ref symptoms instead of improvising repair steps here.

Workflow Router

Open the matching reference and follow only that recipe:

Quick Triage

Use these read-only commands before selecting a recipe:

git log --oneline --decorate --graph -20
git diff --stat
git diff --cached --stat
git reflog --date=relative -20

For branch divergence:

git fetch --all --prune
git status --short --branch
git log --oneline --left-right --cherry-pick HEAD...@{upstream}

If an operation is already in progress, inspect Git's state before continuing:

git status
git rebase --show-current-patch
git diff --cc

Completion Checks

  • git status --short --branch shows the expected branch and worktree state.
  • git diff --stat and git diff --cached --stat match the task scope.
  • Any rewritten or moved commits were verified with git log --oneline --graph.
  • Recovery work leaves a named branch or clear reflog handle for rollback when the operation could discard reachable work.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Guide accessibility reviews for UI, documents, and workflows. Use for WCAG-oriented audits, keyboard review, semantics, contrast, and remediation planning.

日本語の概要は準備中です。原文の説明を表示しています。

CruxExperts/LocalSetup62026年10月21日 更新

Use when choosing a LocalSetup Agent-* lane for exploration, research, bounded implementation, or review. Consult the static capability matrix; do not probe account or network availability.

日本語の概要は準備中です。原文の説明を表示しています。

CruxExperts/LocalSetup62026年10月21日 更新

Guide agent email inbox workflows with prompt-injection defenses. Use for inbound email processing, webhooks, routing, and safety review.

日本語の概要は準備中です。原文の説明を表示しています。

CruxExperts/LocalSetup62026年10月21日 更新

Navigate and understand codebases using agentlens hierarchical documentation. Use when exploring new projects, finding modules, locating symbols in large files, finding TODOs/warnings, or understanding code structure.

日本語の概要は準備中です。原文の説明を表示しています。

CruxExperts/LocalSetup62026年10月21日 更新

Use for Agent Q signed encrypted file-drop or mail ship and ingest, private registry v2 setup, queue status, and transport maintenance.

日本語の概要は準備中です。原文の説明を表示しています。

CruxExperts/LocalSetup62026年10月21日 更新

Inventory wrapper for the alirezarezvani Claude skills bundle. Use when triaging its broad skill catalog and large script surface before any targeted import.

日本語の概要は準備中です。原文の説明を表示しています。

CruxExperts/LocalSetup62026年10月21日 更新

CruxExperts のスキルをすべて見る

このスキルの問題を報告する