Skip to content
mentoor

Git hygiene with agents

For engineers

Small commits, safe branches and reverts, honest PR descriptions and git rules agents actually follow

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

An agent finished a task and the tree has a bug fix, a rename and a formatter run. What is the best way to commit?

Choose one answer

Check yourself · 2 of 5

A bad agent commit is already merged into main. What is the safest way to undo it?

Choose one answer

Check yourself · 3 of 5

What is the best way to treat an agent-written PR description?

Choose one answer

Check yourself · 4 of 5

Why put git rules in an agent's memory file?

Choose one answer

Check yourself · 5 of 5

A secret key was pushed in a commit. What comes first?

Choose one answer

Topics

  1. Small focused agent commits5 min read · One logical change per commit, committed after each green step, staged by explicit path rather than everything
  2. Branches and reverts as safety nets5 min read · A branch per agent task, revert versus reset, and never rewriting history other people or agents share
  3. Honest PR descriptions for agent work5 min read · What changed, why, how it was verified, what is untested, and catching agent claims the diff does not support
  4. Git rules in agent memory files5 min read · Commit message format, attribution trailers, staging rules and forbidden commands written where the agent reads them
  5. Keeping secrets and junk out of commits5 min read · Env files, keys, logs and build output in agent commits; ignore rules, secret scanning, push protection and rotation

Start here

110 questions · last verified 2026-12