---
name: git-cheat-sheet-customizer
description: "A one-page Git reference built around your branching model and the handful of tasks you repeat daily, with the exact commands, the order to run them, and the undo for each. Use when a developer or team wants a one-page Git reference tailored to their branching strategy and the commands they repeat every day. Do not use for explaining a single Git command in depth, or walking through a specific rebase or conflict. Related topics: coding, git, utility."
---

# Git Cheat Sheet Customizer

A one-page Git reference built around your branching model and the handful of tasks you repeat daily, with the exact commands, the order to run them, and the undo for each.

## When to use

Use this skill when a developer or team wants a one-page Git reference tailored to their branching strategy and the commands they repeat every day. Do not use it for explaining a single Git command in depth, or walking through a specific rebase or conflict.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Map the selected tasks onto the stages of a working day (start, commit, sync, share, release, recover) so every task has one place and nothing is listed twice.
3. Write the exact commands for each stage with placeholders for branch names and refs, adjusted to the branching strategy, so each line can be copied as is.
4. Pair the commands that look alike but differ in risk and state which one is safe on a shared branch.
5. Add the alias and undo sections when they are switched on, with a config line per alias and recovery steps ordered from least to most destructive.
6. Trim the sheet to one printed page in the requested format, keeping only the commands the selected tasks need.

## Inputs

- **Branching strategy** (choose one: GitFlow, GitHub Flow, Trunk-based Development, Custom)
- **If custom or unusual, describe it** (longer free text)
- **Tasks I do most** (choose any: Creating branches, Rebasing, Resolving conflicts, Stashing, Tagging releases, Cherry-picking, Reviewing pull requests)
- **Hosting and tools** (free text, e.g. "GitHub with the gh CLI")
- **Output format** (choose one: Markdown, HTML, Plain Text)
- **Suggest aliases** (choose one: Yes, No)
- **Include commands for undoing mistakes** (choose one: Yes, No)

## Output

A one-page cheat sheet in the chosen format, grouped by stage of the working day, each command on one line with a short note, plus optional alias and recovery sections.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### Git Cheat Sheet Customizer

Build a personal Git reference for the way my team actually works.

#### Workflow
- Branching strategy: {{Branching strategy}}
- If custom or unusual, describe it: {{If custom or unusual, describe it}}
- Tasks I do most: {{Tasks I do most}}
- Hosting and tools: {{Hosting and tools}}
- Output format: {{Output format}}

#### Extras
- Suggest aliases: {{Suggest aliases}}
- Include commands for undoing mistakes: {{Include commands for undoing mistakes}}

Organise the sheet by task in the order a working day runs: start work, commit, sync, share, release, and recover. Under each task give the exact commands with placeholders for branch names and refs, one line each, and a half-line note on when the command is the right one. Fit the commands to the branching strategy: a trunk-based team gets short-lived branches and squash merges, a GitFlow team gets release and hotfix branches, and the merge versus rebase choice follows the strategy rather than personal taste. Where two commands look similar but differ in risk (reset versus revert, push versus push --force-with-lease), put them side by side and say which is safe on a shared branch. When aliases are on, propose five to eight aliases for the selected tasks, each with the git config line that installs it. When undo commands are on, add a recovery section ordered from least to most destructive, ending with reflog. Keep the whole sheet to one printed page.

## Pitfalls

- Recommending git push --force on a shared branch when --force-with-lease is the safe default.
- Mixing merge and rebase advice from different strategies, so the sheet contradicts the team's own history rules.
- Listing every Git command instead of the ones the selected tasks need, which turns the sheet into a manual nobody reads.
