Stage and commit changes with git add and git commit

domain: git-scm.com/git · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Check what changed with git status, which shows untracked, modified, and staged files.
  2. Stage the files you want to include: git add <file1> <file2>, or stage everything with git add . (dot stages new and modified files below the current directory).
  3. Verify the staging area: git status now lists staged files under 'Changes to be committed'.
  4. Create the commit: git commit -m "describe the change". Use multiple -m flags to create separate paragraphs in the message.
  5. To stage all modified and deleted tracked files and commit in one step, use git commit -a -m "message" (note -a does NOT stage new untracked files).
  6. To change only the most recent commit message or add files to it, stage the additions then run git commit --amend --no-edit to keep the same message, or omit --no-edit to rewrite it.

Known gotchas

Give your agent this knowledge — and 16,900+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans