Git safety guides

Fix the Git moments that break flow.

Evergreen, practical articles for developers who want fewer scary Git operations: lost work, destructive history edits, unreadable diffs, many-repo drift, and AI agents that propose changes a human approves.

recoveryguide

My AI agent deleted my code

Claude Code or Cursor wiped files or reset a branch? Calm, ordered recovery with git reflog, git restore, and git fsck --lost-found, then the approve-before-it-runs rule that stops it happening again.

recoveryguide

How to undo git reset --hard

Your commits are almost never gone. Find where HEAD pointed before the reset with git reflog, then reset back to HEAD@{1} or branch off the SHA. Correct steps, plus what reflog cannot restore.

recoveryguide

How to recover a deleted Git branch

A branch is just a name on a commit. Find the tip SHA with git reflog or the delete message, then recreate it with git checkout -b. Includes git fsck for when the reflog is gone.

agentsguide

MCP Git server: what it is and how to choose one

What an MCP Git server is, the design space from read-only to write-with-approval, and how to wire one to Claude Code, Cursor, or Codex. Free Apache-2.0 shell, plus 23 read-only and 11 approval-gated write tools.

agentsmanifesto

The case for approve-before-it-runs

The AI world defaults to contain-after: give an agent write access, then wall off the blast radius. Git punishes that. The argument for a capability rule where an agent can only propose a write and a human approves the exact diff first.

agentssetup

Wire any MCP client to Git, safely

Ten minutes from install to your first approval-gated write. 23 read-only tools work against plain local git; the 11 write tools only ever propose, so you approve the diff in the app before anything runs.

safetyguide

What is a safety-first Git client?

How guarded operations, explicit risk previews, restore points, and recovery paths make reset, rebase, and checkout less dangerous while discard stays explicit when no restore point will be created.

recoveryguide

How to recover lost Git work with reflog

A calm recovery workflow for hard resets, deleted branches, rebases, and commits that seem to have disappeared.

diffguide

Semantic diff vs normal Git diff

When structural diffs help, when plain patches are still the source of truth, and why honest fallback matters.

multi-repoguide

How to manage many Git repositories

Local-first strategies for dirty worktrees, behind branches, divergent repos, submodules, and attention stacks.

agentsgovernance

AI agents and Git, without handing over the keys

Why an agent cannot commit your secrets here: no write capability, only proposals a human previews and approves in FluxGit, with restore points and a signed audit chain.

agentscontext

Your agent's context window is the new CPU

Orientation on a test repo measured 10 git calls and 1,886 tokens; repo.brief answered in one call and 607 tokens. Payload size is enforced by a CI test.

monoreposagents

Submodules are where agents go to die

Thirty vendored dependencies means hundreds of CLI commands before the first edit. repo.scope and repo.brief collapse that into two calls.

product

How FluxGit approaches these workflows

FluxGit is in private beta for macOS, Windows and Linux, with safety rails, reflog recovery, semantic diff fallback, Fleet Radar, and MCP for agents: 23 read-only tools plus 11 write operations, all gated by the same human-approval handshake, commit and push included.

Private beta

Try safer Git workflows in FluxGit.

FluxGit is a desktop Git client in private beta for macOS, Windows and Linux. It does not send repository data by default; diagnostics and feedback are explicit, and agents never get direct write access: they propose, you approve.

Request beta access