Comments on The Art of the Commit

12 Reader Comments

Back to the Article
  1. Thanks for the reminder to tell others what we did when we did it. Or it’s a time capsule for a future self. Trying to keep it all in one’s head is a losing game. I disagree about the present tense for what is fixed (just a couple of letters for past tense) but otherwise right on target.

    Copy & paste the code below to embed this comment.
  2. Very helpful article, all of the little things can make a big difference.  After you get into a good routine it just comes naturally, it’s never too late to develop good habits!

    Copy & paste the code below to embed this comment.
  3. I think describing what you really just changed/did is as error-prone as writing “releasing version x.y”, if the change is mentioned at a overview level (like “fixes #xyz”), as you might think you fixed something/ did it correctly but it finally appears to have some problem, which means it will invalidate the meaning of the previous commit message.

    Copy & paste the code below to embed this comment.
  4. @btr:  yes it may not truly be the end-all-fix, but it describes the ‘why’ change was checked in. 

    I also prefer single-purpose change sets so its much easier to state why.

    I tend to favor all merge ops that start with msg “MERGE from branch-x” on the target. (I’m using tfs so I suppose it would be PULL from in git??). Anyways this helps me track down merging issues and helps with tracking of features into main from where they originated.

    I prefer active verb at start then a filename/ what phrase and then why.  Often, the what is why I’m scanning the change log to see who did this or loo for some unknown bug but if I saw the words describing the feature/file with issues and a why it can help narrow down causes if qa/prod issues to changes

    Copy & paste the code below to embed this comment.
  5. This article complemented the current commit structure I’m following. E.g. As a fullstack developer, I’ll add something like this:

    UI: Search bar in header

    Schema: Added userId field to Users schema

    Or in a feature branch in progress:
    Progress: Insert posts into Posts collection

    A complementary message (not in the commit title) would be:
    Missing security checks and tests

    When the feature is finished (usually no more than 2 weeks):
    Finished: Posts insert with checks


    I feel that adding the time is not necessary because it’s already on the log date-time.

    Copy & paste the code below to embed this comment.
  6. Those “Version 1.0” commits….. should never have been thought about, even as a bad example.

    That’s what’s git tagging is about.

    https://git-scm.com/book/en/v2/Git-Basics-Tagging

    Right?

    Copy & paste the code below to embed this comment.
  7. Thanks for the tips! I’ll try to implement the first line / second line committing style into my workflow. It makes a lot of sense. The version number should be handled via git tag -a anyways I guess.

    Copy & paste the code below to embed this comment.
  8. Great! I recommend this trail articles with examples and step-by-step configuration:

    https://gibbon.co/dougaraujos/git-best-practices-commit-messages#chapters

    Copy & paste the code below to embed this comment.
  9. Nice writeup David. I had similar thoughts on the topic that I wrote about last year ( http://www.bluejava.com/4Nk/Improving-Your-Change-Logs—-The-bluejava-Git-Commit-Message-Format ) and even went as far as creating a kind of “spec”.

    I feel that a simple ruleset for your git messages helps you (and/or your team) stay consistent. The spec is on github (of course) at https://github.com/bluejava/git-commit-guide.

    Cheers!

    Copy & paste the code below to embed this comment.
  10. great and nice info thanks.
    http://www.angularjstutorialsng.com/ angularjs tutorial

    Copy & paste the code below to embed this comment.
  11. Informative article, just what I was looking for.

    Copy & paste the code below to embed this comment.
  12. Copy & paste the code below to embed this comment.
  13. Sorry, commenting is closed on this article.