DEV Community

Discussion on: How to write a good commit message

Collapse
 
devmount profile image
Andreas • Edited

Short and clear, thank you for this article!
I tend to use emojis for the type - it shows the type of the commit at first glance, e.g.:

:heavy_plus_sign: when adding a file or implementing a feature
🔨 :hammer: when fixing a bug or issue
💚 :green_heart: when improving code or comments
:zap: when improving performance
📜 :scroll: when updating docs or readme
🔑 :key: when dealing with security
🔁 :repeat: when updating dependencies or data
:white_check_mark: when a new release was built
👕 :shirt: when refactoring or removing linter warnings
:x: when removing code or files

... and looks awesome in the commit history:

Collapse
 
developerkaren profile image
Karen Efereyan

Looks so cool.

Collapse
 
devmount profile image
Andreas

Thank You 😊

Collapse
 
chrissiemhrk profile image
Chrissie • Edited

I've seen emojis being used in some projects but they always seemed intimidating to me, I'll have to look more into how to use them

Collapse
 
devmount profile image
Andreas

It needs a little time to getting used to it, but then you don't want to be without it anymore, I promise 😂

Collapse
 
imjvictor98 profile image
João Victor

I never thought to use emojis for that LOL. THIS'LL HELP ME A LOT. 🤩

Collapse
 
devmount profile image
Andreas

Glad I could help 😊

Collapse
 
banji220 profile image
Banji

Wow, it looks so awesome.
Tnx for sharing your tips :)

Collapse
 
devmount profile image
Andreas

My pleasure 😊

Collapse
 
banji220 profile image
Banji

I think it would be better to write a complete post about the way you are using Emojis!
Keep it up ;)

Collapse
 
devmount profile image
Andreas

Thank you for this suggestion and the encouragement - I'll draft this to my list of post ideas 👍🏻

Thread Thread
 
banji220 profile image
Banji • Edited

Nice to hear that you found my suggestion cool.
I'm waiting for your amazing post.

Keep Moving Forward

Code with 💛

🅑🅐🅝🅙🅘

Collapse
 
iamlukeamiller profile image
Luke Miller

I ALWAYS forget that emojis are valid in all kinds of spaces now. I often use them in debug console messages to make it visual and easy to search, but using them in this git commit message format is super handy. Thanks for the recommendation!

Collapse
 
devmount profile image
Andreas

You're very welcome, I'm glad it's useful for you 😊

Collapse
 
rabbitzzc profile image
rabbitzzc
Collapse
 
be_rajeevkumar profile image
Rajeev Kumar

This is also insightful for me .
Thank you for share it.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️ • Edited

I hate when people do stuff like this. It just looks confusing in the git log. Just use unicode emojis instead, they work everywhere.

BTW my favourite emojis for commit messages: 🎆🎊🎉😖💢😅 (I usually put them at the end of the commit message though)

Collapse
 
devmount profile image
Andreas

Thank you for this valuable addition. Most of the terminals / bash / consoles support way more than unicode emojis nowadays. So that shouldn't be a problem for most of us. Here is, what my git log looks like:

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Unicode emojis are standardized though, while the :: notation is not.

Collapse
 
maxiqboy profile image
Thinh Nguyen • Edited

Thanks for your tip!

Here is the web for other Git emoji ideas: gitmoji.carloscuesta.me/

For me, it looks too much to remember,

so I just use some emojis to keep it simple:

🎉 :tada: initial commit 🎉

🚀 :rocket: [Add] when implementing a new feature

🔨 :hammer: [Fix] when fixing a bug or issue

🎨 :art: [Refactor] when refactor/improving code

🚧 :construction: [WIP]

📝 :pencil: [Minor] Some small updates

Collapse
 
goodevilgenius profile image
Dan Jones

It is too much to remember. I use github.com/carloscuesta/gitmoji-cli so that I don't have to remember which emoji is used for which type. It's a git commit hook, so I just do git commit, and it interactively helps me pick the appropriate emoji, write my commit message, and then drops it into my editor to make changes as needed.

Thread Thread
 
nutriz profile image
Jérôme Gully

If you must use an additional tool to remember your emoji meaning, I bet other too are lost for the interpretation of the emoji, once the wow effect has passed, I think words are much easier and quicker to understand :)

Thread Thread
 
devmount profile image
Andreas

I almost always use both: emoji for recognizing the commit type at first glance and text for a clear and unambiguous description 👍🏻

Thread Thread
 
nutriz profile image
Jérôme Gully

yes but even for the commit type, I find a word more meaningful than an emoji (and new people on the project / people reading commits without being part of the project) don't need to learn what emoji corresponds to what :).

Thread Thread
 
devmount profile image
Andreas

You make using emojis sound like rocket science 😅 we're talking about little pictures with clear content. A hammer is for fixing something, a scroll is for something documentation related. There really isn't much to learn 🤷‍♂️

Collapse
 
devmount profile image
Andreas

My pleasure 😊
This is also a nice interpretation, in the end it's a matter of taste, I think.

Collapse
 
karltaylor profile image
Karl Taylor

I LOVE THIS. I might even print it out and stick on my wall. Thankyou!

Collapse
 
devmount profile image
Andreas

You're welcome 😊