Git Rollback After AI Edits: 5 Commands to Recover Your Code
AI broke your code? Commit before it starts, then use diff, restore and stash to roll back from lightest to heaviest, with a full recovery example.
Blog
与「Claude Code」相关的文章。
AI broke your code? Commit before it starts, then use diff, restore and stash to roll back from lightest to heaviest, with a full recovery example.
Start with default prompts, then allow safe read-only commands and deny sensitive files. Covers the four modes, rule syntax, and a copy-ready starter config.
Set Claude Code to reply in Chinese with CLAUDE.md or user-level config. Three methods, a verification checklist, and why English still creeps in afterward.
npm install -g fails with EACCES because the global directory belongs to root. Fix it with nvm or a custom prefix, not sudo. Commands and a triage table.
Point Claude Code at AGI Plan by changing the base URL and API key. Env var and settings.json setups, verification, rollback, and common error fixes.
Claude Code has no separate fee; costs come from a Claude subscription or API usage. Compare the official subscription, the official API, and RMB gateways, plus 5 checks to run first.
The core difference is the header: API_KEY sends x-api-key, AUTH_TOKEN sends Authorization: Bearer. When to use each, what conflicts, and a 5-step checklist.
How to use AGI Plan: sign up with an email code, pick a plan and create an API key, then change one base URL in Claude Code, Codex, or Cherry Studio. Pay in RMB.
Claude Code vs Codex CLI compared on config files, permissions and sandboxing, API format, and login, plus a decision table and setup checklist.
Claude Code works in your terminal; Cursor is an AI code editor. Compare workflow, learning curve, and setup, plus 5 self-test questions to pick the right one.
An AI agent is a model-driven program that calls tools and works in multiple steps. See how Claude Code and Codex loop, and why agents burn more tokens.
CLAUDE.md is the file Claude Code reads at the start of every session. Where it lives, how it loads, what /init generates, plus a template and a checklist.
Claude Code slash commands and shortcuts grouped by session, context, permissions and config, with when to use each one and how to choose /compact vs /clear.
Switch Claude Code models with /model per session, or set a default via ANTHROPIC_MODEL or settings.json. Precedence, verification, and third-party model names.
Claude Code login failed? Tell OAuth from API Key first, then check service status, network, and env var conflicts. Includes a table and a six-step checklist.
Compare native Windows and WSL installs of Claude Code, then set it up in WSL in 6 steps and fix the common path, performance, and environment variable problems.
Install commands for Claude Code on each OS, how to verify with claude --version, and a lookup table for the three usual failures: permissions, PATH and network timeouts.
AI coding has no single monthly price, but you can estimate it: size your daily tokens, apply official rates, and compare pay-as-you-go with a subscription.
Learn what MCP (Model Context Protocol) is, what host, client and server do, how to add your first MCP server in Claude Code, and a security checklist.
Install, pick an auth method, run a first task, review the diff, and learn the slash commands in 5 steps, with a comparison of both auth options and a troubleshooting checklist.
A subscription suits official clients and a working account; a gateway suits many tools and CNY payment. Four factors, three reader profiles, and a checklist.
Compare Claude Code subscription login and API key login on billing and terms, check which one is active, switch between them, and fix auth conflicts.
Set CLAUDE_CODE_USE_VERTEX, a project ID, and a region, then sign in with gcloud. Includes fixes for 429 quota errors and 404 model-not-enabled errors.
Set up Claude Code on AWS Bedrock: required env vars, credential sources, a minimal IAM policy, and fixes for model access, region, and permission errors.