Skip to content
Back to skills

Working With Git

ASecurity

Use when you need to know how Git itself works: command flags (including worktree and branch), concepts, internals, Pro Git, and guides for rewriting history, bisect, recovering lost commits, conflicts, Git servers. Not for how we use git (commits, PRs, worktrees, review loops: git-github-workflows), GitHub and gh (working-with-github), CI or Apps.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
developmentrustgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 13, 2026

npx -y skills add joeblackwaslike/agent-skills --skill working-with-git --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Working With Git?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Working With Git
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joeblackwaslike-working-with-git/badge)](https://www.skillsdirectory.com/skills/joeblackwaslike-working-with-git)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: working-with-git
description: "Use when you need to know how Git itself works: command flags (including worktree and branch), concepts, internals, Pro Git, and guides for rewriting history, bisect, recovering lost commits, conflicts, Git servers. Not for how we use git (commits, PRs, worktrees, review loops: git-github-workflows), GitHub and gh (working-with-github), CI or Apps."
metadata:
  last_updated: "2026-11-10"
---

# Working with Git

Offline reference for **Git the version-control system**, pinned to a known Git release (see [`PINNED_VERSION`](PINNED_VERSION) / [`references/VERSIONS.md`](references/VERSIONS.md), resolved via Homebrew). Command and concept pages in [`references/cli/`](references/cli/) are the **AsciiDoc sources from `git/git`** at the pinned tag; the full **Pro Git** book (2nd ed.) is in [`references/book/`](references/book/); opinionated how-to guides are in [`references/howto/`](references/howto/). Fetched files carry `source`/`fetched_at`/`sha256` frontmatter; the how-to guides are hand-written.

## What this skill is not

- **Not our process.** Committing, opening PRs, worktree conventions, review loops, releases: `git-github-workflows`.
- **Not GitHub.** The gh CLI, PRs on the platform, REST/GraphQL: `working-with-github`.
- **Not CI.** Workflow YAML and Actions: `working-with-github-actions`.
- **Not app development.** GitHub Apps and Octokit: `developing-for-github`.
- **This skill** = how raw git behaves.

## Quick reference

| Task | Read |
|---|---|
| Exact flags for a command | `references/cli/git-<command>.adoc` (e.g. `git-rebase.adoc`, `git-commit.adoc`) |
| Concept page (attributes, hooks, revisions, glossary) | `references/cli/git<topic>.adoc` (e.g. `gitrevisions.adoc`, `githooks.adoc`, `gitglossary.adoc`) |
| Learn a topic deeply | `references/book/*.asc` (Pro Git, e.g. `03-git-branching__*`) |
| Rewrite history safely | `references/howto/rewriting-history.md` |
| Find the commit that broke it | `references/howto/bisect.md` |
| Undo / recover (reflog, reset/revert/restore, lost commits) | `references/howto/fixing-mistakes.md` |
| Merge vs rebase, resolve conflicts, rerere | `references/howto/merging-and-conflicts.md` |
| Host or connect to a Git server | `references/howto/git-servers.md` |
| Worktree conventions for feature or parallel-agent work | `git-github-workflows` → `references/worktree-conventions.md` |

## How to use this skill

1. **Exact command behavior/flags** — read `references/cli/git-<command>.adoc`. These are the literal man-page sources for the **pinned** Git version; trust your local `git help <command>` if it disagrees and surface the drift.
2. **Conceptual understanding** — read the relevant Pro Git chapter in `references/book/` (filenames are the chapter path flattened with `__`).
3. **"How do I safely do X"** — start with `references/howto/*.md`; these are the opinionated playbooks for the dangerous/confusing operations.
4. **Searching** — `grep -ri <term> references/` across all three.

## Behavioral guidance

- **History rewriting is destructive.** On shared branches, always `git push --force-with-lease` (never bare `--force`), and confirm no one else has the branch. See `references/howto/rewriting-history.md`.
- **`git stash` drops untracked files** unless you pass `-u`. Reach for `git stash -u` when in doubt.
- **Reflog is the safety net** — almost any "lost" commit is recoverable via `git reflog` for ~90 days. Check it before declaring data lost.

## Keeping this current

Regenerated by [`scripts/update_docs.js`](scripts/update_docs.js): it re-resolves the Git stable version from Homebrew, rewrites `PINNED_VERSION`, fetches the matching `git/git` AsciiDoc, and refetches Pro Git. Refresh locally with `make update-working-with-git`. In CI (no Homebrew) the committed pin tag is used unchanged.

Files in this skill

  • PINNED_VERSION23 B
  • SKILL.md3.8 KB
  • references/VERSIONS.md682 B
  • references/book/01-introduction__sections__about-version-control.asc4.8 KB
  • references/book/01-introduction__sections__command-line.asc1.2 KB
  • references/book/01-introduction__sections__first-time-setup.asc6.4 KB
  • references/book/01-introduction__sections__help.asc2.6 KB
  • references/book/01-introduction__sections__history.asc1.6 KB
  • references/book/01-introduction__sections__installing.asc5.5 KB
  • references/book/01-introduction__sections__what-is-git.asc8.1 KB
  • references/book/02-git-basics__sections__aliases.asc2.5 KB
  • references/book/02-git-basics__sections__getting-a-repository.asc4.2 KB
  • references/book/02-git-basics__sections__recording-changes.asc25.2 KB
  • references/book/02-git-basics__sections__remotes.asc11.4 KB
  • references/book/02-git-basics__sections__tagging.asc9.3 KB
  • references/book/02-git-basics__sections__undoing.asc9.2 KB
  • references/book/02-git-basics__sections__viewing-history.asc13.3 KB
  • references/book/03-git-branching__sections__basic-branching-and-merging.asc12.5 KB
  • references/book/03-git-branching__sections__branch-management.asc6.4 KB
  • references/book/03-git-branching__sections__nutshell.asc9.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.