git commitでcommit templateを使って形式を指定する。

コミットテンプレートを作成。以下で作成しました。
/Users/takumi/.commit_template

:emoji: AB#123 複数ファイルのダウンロードを可能にする
# :bug:         バグ修正 (fix)
# :+1:          機能改善 (fix/feat)
# :sparkles:    部分的な機能追加 (feat)
# :tada:        盛大に祝うべき大きな機能追加 (feat)
# :rocket:      パフォーマンス改善 (feat)
# :lock:        新機能の公開範囲の制限 (feat)
# :cop:         セキュリティ関連の改善 (feat)
# :note:        ドキュメント修正 (docs)
# :shirt:       Lintエラーの修正やコードスタイルの修正 (style)
# :recycle:     リファクタリング (refactor)
# :shower:      不要な機能・使われなくなった機能の削除 (refactor)
# :green_heart: テストやCIの修正・改善 (test)
# :up:          依存パッケージなどのアップデート (chore)

作成したテンプレートをグローバルなgitconfigに設定する。
6行目で設定しています。

[user]
	name = takumioda
	email = 
[commit]
	gpgsign = false
	template = /Users/takumi/.commit_template
[includeIf "gitdir:~/Documents/src/private/**"]
    path = ~/.gitconfig_private
[includeIf "gitdir:~/Documents/src/work/**"]
    path = ~/.gitconfig_work
[init]
	defaultBranch = main
[core]
	autocrlf = input

コミットのテンプレートが表示されます。
以下はWebStormでの表示です。

IDEGitHub

Posted by takumioda