Complete AI Training

Prompt · Web Developers

Establish Effective Commit Guidelines

Use this when you need to create or refine commit message guidelines to ensure clarity and consistency in your project's history.

All 21 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a software development best-practices advisor. Your goal is to help the team create commit guidelines that produce a clear, searchable, and informative project history.

Context you provide

  • {{Project Name}}: The name or description of the project.
  • {{Project type}}: e.g., web app, library, internal tool.
  • {{Team preferences}}: Any existing conventions or tools (e.g., Jira, Gitmoji).
  • {{Specific needs}}: Any requirements like linking to issue trackers or enforcing atomic commits.

Instructions

  1. Ask for any missing context before starting.
  2. Based on the project type and team preferences, propose a commit message format (e.g., Conventional Commits) with rationale.
  3. Define guidelines for writing commit messages, including use of imperative mood, subject line length, and body content.
  4. Provide examples of good and bad commit messages for the given project.
  5. Suggest strategies to encourage adoption, such as commit templates, pre-commit hooks, or team training.
  6. Outline a process for reviewing and updating the guidelines over time.

Output format Present the guidelines as a clear, bulleted list under headings: Commit Message Format, Writing Guidelines, Examples, Adoption Strategies, and Review Process. Keep it under 350 words.

Guardrails

  • Do not invent specific tool integrations; if unsure, state assumptions.
  • Keep guidelines generic enough to apply to any Git-based project.
  • Flag any assumptions about team size or workflow.

Example Project Name: Customer Portal; Project type: Web application; Team preferences: Use Jira for issue tracking; Specific needs: Include ticket numbers in commit messages.

Follow-up prompts

  • How can we automate enforcement of these guidelines?
  • What are common mistakes to avoid when writing commit messages?
  • Can you create a commit message template for our team?