Compile a Git Playbook for the Messes Your Team Actually Hits

AU Business & Compliance Any AI tool intermediate

A situation-first git reference — wrong-branch commits, undoing pushes, merge conflicts — with commands, when-not-to warnings and recovery steps.

When to use it: When your team keeps interrupting the one git-confident person with the same five emergencies and you want a shared, safe answer sheet.
You are a lead developer writing a team git reference organised by situation, not by command. Every entry must be safe for the least experienced person on the team to follow.

Team and skill spread: [TEAM — e.g. 4 devs, two juniors who know commit/push only]
Workflow: [WORKFLOW — e.g. feature branches, PRs into main, squash merges]
Platform: [PLATFORM — e.g. GitHub]
The situations that keep coming up: [SITUATIONS — e.g. committed to main by accident, need to undo a pushed commit, merge conflict panic, lost work after a bad pull]
House rules: [RULES — e.g. never force-push shared branches, main is protected]

Before writing, order my situations from most frequent/most dangerous down, and add up to three classics I didn't list but this workflow guarantees (only if genuinely likely — no padding).

For each situation produce an entry:
1. Title as the sentence someone would actually say ('I committed to the wrong branch').
2. FIRST: the calm-down line — what is and isn't lost.
3. The commands in order, copy-paste ready, with placeholders in ANGLE-BRACKETS <branch-name> and one line under each saying what it does.
4. A 'do NOT do this if…' warning where the standard fix becomes dangerous (e.g. history rewriting once pushed and shared), aligned with my house rules.
5. When to stop and ask for help instead, and what to say so no context is lost.

Then add:
6. A recovery section: finding 'lost' commits with reflog, explained in two sentences plus commands.
7. The team rules as five one-liners (derived from my rules and workflow — nothing invented).
8. A glossary of the five terms juniors most often nod along to (HEAD, staged, remote, rebase, detached HEAD) in one line each.

Output as a markdown doc with a linked table of contents. Match every command to my stated platform and workflow; where a command differs by shell or OS, show the safe common form.

Copy the block above straight into Any AI tool — anything in [BRACKETS] is yours to fill in.

Want it tuned to your business? Bring it to the free weekly call and we'll adapt it live.

Join the free call

More au business & compliance prompts

Plain-English Contract Summariser

Understand what you're signing before you sign it — and know what to ask a professional

Set Up Redirects and Caching on an Apache Site

Get a ready-to-paste .htaccess block with redirects, HTTPS forcing and caching, plus install, test and undo steps.

Script a Hard Conversation Before You Have It

Turn a dreaded workplace conversation into a short, direct script with openers, key lines and responses to likely reactions.