Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Git

$ git Foundation Med Risk
Git Project · Code & DevOps · GPL-2.0 · macos / linux / windows

The standard distributed version control system powering modern software repositories. Offers scriptable --porcelain status formats, --no-pager output, and --dry-run on selected write operations, though destructive history commands require strict agent guardrails.

FCRS-1.0 Score
88 /100
Good
High Confidence
Zero-Friction Install
brew install git
CLI vs MCP Decision CLI Only

Keep git as a direct shell CLI: local working-tree inspection, staging, and diffs require sub-millisecond filesystem access that MCP wrappers add latency to.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
git version 2.54.0 (Apple Git-157)
Startup
8 ms
Exit Codes (help / invalid)
0 / 129
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]
           [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]
           [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone      Clone a repository into a new directory
   init       Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add        Add file contents to the index
   mv         Move or rename a file, a directory, or a symlink
   restore    Restore working tree files
   rm         Remove files from the working tree and from the index

examine the history and state (see also: git help revisions)
   bisect     Use binary search to find the commit that introduced a bug
   diff       Show changes between commits, commit and working tree, etc
   grep       Print lines matching a pattern
   log        Show commit logs
   show       Show various types of objects
   status     Show the working tree status

grow, mark and tweak your common history
   backfill   Download missing objects in a partial clone
   branch     List, create, or delete branches
   commit     Record changes to the repository
   history    EXPERIMENTAL: Rewrite history
   merge      Join two or more development histories together
   rebase     Reapply commits on top of another base tip
   reset      Set `HEAD` or the index to a known state
   switch     Switch branches
   tag        Create, list, delete or verify tags

collaborate (see also: git help workflows)
   fetch      Download objects and refs from another repository
   pull       Fetch from and integrate with another repository or a local branch
   push       Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Provides --porcelain=v2, --no-pager, and GIT_TERMINAL_PROMPT=0 for headless scripting, though it lacks universal --json output across subcommands.

  • Supports git status --porcelain=v2 and git --no-pager
  • Supports GIT_TERMINAL_PROMPT=0 to prevent credential prompt hangs
Trust & Safety 20 / 25

Offers --dry-run (-n) on commands like git clean and git push, but commands such as git reset --hard can irreversibly discard uncommitted work.

  • git clean -n and git push --dry-run preview side effects
  • Destructive commands (reset --hard, push --force) require policy guardrails
Setup & Portability 15 / 15

Pre-installed or trivially available on macOS, Linux, and Windows with minimal footprint.

  • Native packages on all major OSes and CI runners
Utility & Efficiency 15 / 15

Indispensable source-control foundation with fine-grained plumbing and porcelain commands for every repo workflow.

  • Full local and remote repository lifecycle coverage
Maintenance & Lineage 10 / 10

Mature foundation-backed project under the Software Freedom Conservancy with continuous security and feature releases.

  • Maintained by the Git Project under GPL-2.0
Docs & Verifiability 9 / 10

Extensive built-in manpages (git help <cmd>) and official reference documentation.

  • Complete command reference at git-scm.com/docs

Security, Auth & Guardrails

Auth Modes
No Auth OS Keychain Config File Env API Key
Credential Storage

Delegates remote auth to git-credential helpers (macOS Keychain, libsecret, Windows Credential Manager), SSH keys, or ~/.git-credentials.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

Free and open-source under GPL-2.0 with no runtime service fees.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Git (git) Agent Rules
- Always pass `--no-pager` (or set `GIT_PAGER=cat`) and `GIT_TERMINAL_PROMPT=0` in automation.
- Never run `git reset --hard`, `git clean -fd`, or `git push --force` without explicit user approval.
- Inspect changes with `git status --porcelain=v2` and `git diff` before staging or committing.

Agent-Ready Command Recipes

Safe Read-Only Queries

Machine-readable repository status
git --no-pager status --porcelain=v2 --branch

Emits stable, parseable status and branch tracking lines without launching an interactive pager.

Inspect recent commit history compactly
git --no-pager log -n 15 --oneline --no-decorate

Returns concise commit hashes and subjects for fast context gathering.

Controlled Writes & Previews

Preview untracked file cleanup safely
git clean -nd

Uses -n (--dry-run) to list untracked files and directories that would be deleted before making any changes.

Strengths for Agents

  • + Scriptable --porcelain=v2 status and -z null-delimited output handle arbitrary filenames safely.
  • + GIT_TERMINAL_PROMPT=0 and --no-pager prevent interactive TTY blocks.
  • + Available everywhere with zero external runtime setup.

Caveats & Pitfalls

  • ! No universal --json output flag across log, diff, or branch.
  • ! Working-tree destructive commands (git reset --hard, git clean -fd) can wipe uncommitted agent edits.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI