Skip to content

Instantly share code, notes, and snippets.

@yeiichi
Last active May 1, 2025 05:35
Show Gist options
  • Select an option

  • Save yeiichi/794fe184030c12b5805860dcf107b9cc to your computer and use it in GitHub Desktop.

Select an option

Save yeiichi/794fe184030c12b5805860dcf107b9cc to your computer and use it in GitHub Desktop.
Helps the user construct a Git commit message interactively.
gitmsg () {
read -r "type?Type (feat/fix/refactor/docs/test/chore/style): "
read -r "desc?Description: "
read -r "file?File name: "
msg="${type}: ${desc} (${file})"
echo "git commit -m '${msg}'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment