Gitのコミットログは過去形ではなく現在形(=命令形)で


このエントリーをはてなブックマークに追加

Gitのコミットログには、現在形で書く流派と過去形で書く流派がある。

どちらにすべきか決めかねていたが、Should I use past or present tense in git commit messages? - Stack Overflowを見て現在形、より正確には命令形を使うことに決めた。その理由は

である。

git.git - The core git plumbing は以下のように述べている。

Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour. Try to make sure your explanation can be understood without external resources. Instead of giving a URL to a mailing list archive, summarize the relevant points of the discussion.

このガイドラインには、コミットログにはimperative mood(=命令法≒(?)命令形)を使えとはっきり書かれている。見た目には現在形と区別がつかないが、気持ちとしては命令である。プログラマが、Gitのレポジトリに対して、このようにふるまいを変えろと命令している様をイメージすればよいようだ。