---
title: "Discussion on \"Write Git Commit Messages That Your Colleagues Will Love\" | Hashnode"
description: "Discussion on \"Write Git Commit Messages That Your Colleagues Will Love\". Your future self will thank you for learning the three most important rules"
url: "https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Write Git Commit Messages That Your Colleagues Will Love](https://prplcode.hashnode.dev/write-git-commit-messages-that-your-colleagues-will-love?utm_source=hashnode&utm_medium=feed)

Your future self will thank you for learning the three most important rules

Jul 1, 2022 · 4 min read · prplcode.hashnode.dev  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

@prplcode · Stockholm, Sweden

  
[View profile](https://hashnode.com/@prplcode)

Sr. Software Engineer @Spotify | Tech Blogger 💻 | Professional Nerd 🤓 | Musician 🎸 | https://prplcode.dev

Sr. Software Engineer @ Spotify | Tech Blogger 💻 | Professional Nerd 🤓 | Musician 🎸

## Responses 14

Markdown supported · ⌘↵ to post

[Sy Hung Doan](https://hashnode.com/@hungdoansy)

[Jul 30, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62e51b61430bd1d04a8411d9)

Hey could you write some more examples of 'imperative mood'? I kinda get the idea, but do not really get how to write a good one.

[Abubakar Shuaib](https://hashnode.com/@AbubakarShuaib)

[Jul 6, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c5699ce0db3b6fe5d08b22)

Awesome

[The Revealer](https://hashnode.com/@therevealer)

[Jul 5, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c4c6116d73625bbffdd41d)

Short, straight to the point and excellent.

I love your work here man👏👏👏👏.

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 6, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c4c6116d73625bbffdd41d#reply-62c536ee6fd02568d1d280fa)

Thanks so much! I appreciate your kind words :)

[Ijeoma Igboagu](https://hashnode.com/@Ijay)

[Jul 5, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c4a9885527bf5d12a262c4)

Thanks for Sharing

[Yahaya Oyinkansola](https://hashnode.com/@Kansoldev)

[Jul 5, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c499296d73625bbffdcf20)

What stood out for me was when you said my commit messages should explain why and not what, a really good mindset shift, thanks a lot!

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 6, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c499296d73625bbffdcf20#reply-62c536d66fd02568d1d280ef)

Glad you like it, Yahaya! :)

[Roshith R](https://hashnode.com/@roshith)

[Jul 5, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c3d730ccecfb25bbc7a945)

Great

[Ammaar Aslam](https://hashnode.com/@ammaaraslam)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2bf1bc0401b3dcbcfd027)

Great content! Thanks for sharing 🤩

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2bf1bc0401b3dcbcfd027#reply-62c2d230ccecfb25bbc78684)

Appreciate it, Ammaar! :)

[Saanvi](https://hashnode.com/@saanvi55)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2b40eccecfb25bbc77fe5)

Awesome article. Thanks a lot for sharing.

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2b40eccecfb25bbc77fe5#reply-62c2d225ccecfb25bbc78674)

Thanks a lot, Saanvi! :)

[Saanvi](https://hashnode.com/@saanvi55)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2b2b6c0401b3dcbcfcd19)

Very Insightful...!!

[trav](https://hashnode.com/@techsavvytravvy)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c28eb0ccecfb25bbc77804)

I always struggle to write meaningful commits, thanks for this!

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c28eb0ccecfb25bbc77804#reply-62c2d213c0401b3dcbcfd419)

Hi Travis! I struggle too at times. This usually means I'm committing too much at once, and I split up the commit into two or more. Hope this was useful :)

[Prafful Javare](https://hashnode.com/@profgrammer)

[Jul 3, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2129fc0401b3dcbcfb69f)

Loved these tips. I have been following the "imperative mood" styling ever since I read it in the contribution guide of a public repository. I usually use the vscode git extension for my commits, so can I separate the title from the body by adding a line break?

[Prafful Javare](https://hashnode.com/@profgrammer)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2129fc0401b3dcbcfb69f#reply-62c28180c0401b3dcbcfc1fd)

Understood. Thanks [Rafael B. Pires](https://hashnode.com/@bpires)! I thought commits also have titles and bodies similar to pull requests 🤔

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2129fc0401b3dcbcfb69f#reply-62c2d1c5c0401b3dcbcfd3ff)

[Prafful Javare](https://hashnode.com/@profgrammer)

Hi. Yes, indeed Git does have a subject line ("title") as well as a body ("description"). I don't use VSCode so I don't know about that but when you use Git in the CLI you separate subject line and body with a newline. This is most likely what you need to do in VSCode as well :)

[Rafael B. Pires](https://hashnode.com/@bpires)

[Jul 9, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c2129fc0401b3dcbcfb69f#reply-62c9172ce62bf98e0fb073c4)

Simon, what I meant by Git doesn't differentiate title and description is that it's not required by default, but by good practices (which can include, also, the footer).

Here's what the docs say: "Though not required, it’s a good idea to begin the commit message with a single short (less than 50 characters) line summarizing the change, followed by a blank line and then a more thorough description. The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git." ([git-scm.com/docs/git-commit](https://git-scm.com/docs/git-commit#_discussion))

It's said that this soft rule was established from the analysis of the commits in the kernel codebase.

In fact, you can (and should) concatenate paragraphs, but you can also type just one very long commit message with all the descriptions, which is not recommended at all and would make the git log unreadable 😅

So, initially, the title and description are nothing more than just the first line, and the rest of the lines in the commit message, usually separated by a blank line, by convention. But, as you said, there's a subject line indeed 😌

I thought this could make it clearer for Prafful to visualize the usage in VS Code, but it made it more difficult instead. My bad, sorry!

[Anтo](https://hashnode.com/@antoninhrlt)

[Jul 3, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c20ff7ccecfb25bbc76a17)

Useful and well-written, Thank you

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 4, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c20ff7ccecfb25bbc76a17#reply-62c2d1d5c0401b3dcbcfd408)

:) Thank you, Antonin.

[Rafael B. Pires](https://hashnode.com/@bpires)

[Jul 3, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c1d86dc0401b3dcbcfaf9f)

Great and insightful overview... straight to the point! Thanks for sharing

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 3, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c1d86dc0401b3dcbcfaf9f#reply-62c1ef97c0401b3dcbcfb257)

Thank you, Rafael! Glad you liked it :)

[Chijioke Chika](https://hashnode.com/@cjchika)

[Jul 3, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c1ce3fccecfb25bbc76183)

Informative, thanks for sharing.

[Simon Egersand 🎈](https://hashnode.com/@prplcode)

[Jul 3, 2022](https://hashnode.com/posts/write-git-commit-messages-that-your-colleagues-will-love/62bef0301f580e1c22664421/comment/62c1ce3fccecfb25bbc76183#reply-62c1ef81c0401b3dcbcfb250)

Thanks, Chijioke!
