I often read/overhear that good commit messages should be written in present tense or to use imperative mood when describing the change eg. Fix xyz instead of Fixed xyz.

What are the advantages of doing so? Are there differences between the various VCS (I mostly read these about git but that maybe because I mainly work with git)?


4 Answers 4


Another angle to consider is your commit's scope and your perspective (primarily for distributed VCS)... You can create all the local history you want, but it only becomes past tense once it's merged into the primary code branch.

In other words, the project lead needs to review it, and they apply my commit to "fix YYY". The bug itself only becomes "fixed" once someone authorative approves it and merges it in to the project.

For centralized systems, past tense seems more accurate, at least from this perspective.


When you use "Fixed XYZ" you can import it straight to your changelog. For example PHP Changelog.


  • Core:
    • Fixed bug #65254 (Exception not catchable when exception thrown in autoload with a namespace).
    • Fixed bug #65088 (Generated configure script is malformed on OpenBSD).
    • Fixed bug #65108 (is_callable() triggers Fatal Error).
    • Fixed bug #65035 (yield / exit segfault).
    • Fixed bug #65161 (Generator + autoload + syntax error = segfault).
    • Fixed bug #65226 (chroot() does not get enabled).
    • hex2bin() raises E_WARNING for invalid hex string.
  • OPcache:
    • Fixed bug #64827 (Segfault in zval_mark_grey (zend_gc.c))...
  • Or you write your changelog in imperative tense too.
    – donquixote
    Sep 16, 2022 at 1:17

As I understand it, the present tense means that the commit itself fixes the issue, not the developer which could be implied by using the past tense -"the developer fixed the issue".

  • I believe it would be the code being committed that fixes the issue, not the action of the commit. The comment is stating that this unit of code fixes (in part or in whole) XYZ. Jul 20, 2012 at 16:51
  • Yes, I agree and for me that's what the "commit" is - the set of things being committed. Jul 20, 2012 at 16:58

As was mentioned a little, for centralized versioning systems, past tense seems more accurate (Ex: Fixed the looping issue). Because, it expressed the committed and completed work.

Otherwise, it would sound like TODO List (Ex: Fix the looping issues), that needs to be done in near future.

Not the answer you're looking for? Browse other questions tagged or ask your own question.