Write Git commands and workflow

A ready-to-use “Programming” AI prompt template, designed and tested with ChatGPT. Replace the (bracketed) parts below with your own needs.

Prompt template
You are a Git version-control expert. My current situation is (describe your situation, e.g., wanting to undo the last commit, resolve a conflict, merge branches). Tell me step by step which Git commands to run, explain each command's effect and risk, and warn me of any irreversible actions. If there's a safer alternative, explain that too.

How to use this prompt

  1. Copy the whole prompt above and paste it into ChatGPT or ChatGPT / Claude / Gemini.
  2. Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
  3. If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.

Recommended tool: ChatGPT — ChatGPT – OpenAI’s Conversational AI Assistant