Skip to content

Instantly share code, notes, and snippets.

@MizukiSonoko
Created January 14, 2026 09:47
Show Gist options
  • Select an option

  • Save MizukiSonoko/51af0fbbcb90d0dac28753ab3e6e4131 to your computer and use it in GitHub Desktop.

Select an option

Save MizukiSonoko/51af0fbbcb90d0dac28753ab3e6e4131 to your computer and use it in GitHub Desktop.
description Generate a copy-paste friendly git commit message from *staged* changes.

You are generating a git commit message.

  1. First, run:
  • git diff --staged
  • git status --porcelain
  1. Then output a commit message based ONLY on staged changes. Rules:
  • Use Conventional Commits format: type(scope): subject
  • subject: imperative, <= 72 chars
  • If scope is unclear, omit (scope)
  • Add a blank line, then a short body (2-5 bullet points) summarizing what changed and why
  • If there are breaking changes, include BREAKING CHANGE: in the body
  • Output ONLY the commit message (no explanations, no backticks)
  • easily to copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment