question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

✨(πŸ“): Gitmoji conventionnal commits (draft)

See original GitHub issue

Hello all,

here is only a reflexion about creating a convention for commit messages using Gitmoji.

This should not be included in the gitmoji project; but should serve as help for people who wants to use gitmoji in a team. This is then a draft of how to use them well or at least a way to sort the gitmojis. Not all the gitmojis are included btw.

Motivation for a convention

  • Gitmoji can improve readability of commits and provides more informations than the other conventions
  • there is a lot of gitmojis now; how to use them when the project is shared ? Is there a way to sort them ?
  • some gitmojis are dedicated to an action; other to a scope and other are just funny. They should be sorted for serious usages.

The only problem is that gitmojis are not supported everywhere and thus, should be used when every members can read them.

Convention

The Angular commit convention follow this rule <type>(<scope>): <subject> and have proven that it works well. Gitmoji can match nearly this case: <type> can be replaced by <action>. β€œaction” matches better the gitmoji definitions on the website.

  • the action defines the activity of the commit ; it describes what or how it is done on the project
  • the scope is optional and can be provided as text or as a Gitmoji. It gives the where in the project. It could be a abstract portion of the project (documentation, database, …) or one filename.
  • the description is a free text

At least one gitmoji must be used for each commit

Sorting the gitmojis

Action (What ?)

action (related to) Gitmojis
the code 🎨, ⚑, πŸ›, πŸš‘, ✨, 🚨, ♻️, πŸ”§, πŸ‘½,πŸ’‘, πŸ’¬,πŸ‘₯, 🚸, πŸ—οΈ,🀑, πŸ“Έ, 🏷️, πŸ₯…, πŸ—‘οΈ
Git / Version Control System πŸŽ‰, πŸ”–, βͺ, πŸ”€
the project strucure πŸ”₯, πŸ“, πŸš€, πŸ”’, πŸ’š, πŸ‘·, πŸ“ˆ, βž•, βž–, πŸ“¦, 🚚, πŸ“„, 🍱, πŸ™ˆ

Scope (Where ?)

specific scope on Gitmojis
part of the code πŸ‘·, 🌱, πŸ’„, πŸ—ƒοΈ
OS 🍎, 🐧, 🏁, πŸ€–, 🍏
technologies 🐳, ☸️, …
user πŸ“±, …

Outsider

πŸ’©, 🍻, πŸ‘Œ, … but always funny to use

Translating the Angular convention

Angular types possible Gitmoji(s)
feat ✨, β™Ώ, 🚸, …
fix πŸ›
docs πŸ“
style 🚨, 🎨
refactor ♻️
test βœ…
chore 🚚, πŸ”₯, πŸ“¦, ⬇️, ⬆️, πŸ‘½, πŸ“Œ, πŸ”– …

Examples

🀑(idGenerator.ts): add mocks

πŸ™ˆ ignore the dist directory

πŸ“Έ(home.vue)

🏷️(interfaces.ts): add type definition for EmojiReponse

🚚 id_generator.ts β†’ IdGenerator.ts

πŸ”€ feat/api-v1 β†’ master

πŸ”€ feat/api-v1 into master

πŸ”₯(eslintrc.json): duplicate with eslintrc.js

🚨(store.ts)

♻️(πŸ—ƒοΈ) : rename the field β€œage” in the table USER

Comments

As the new issue #435 is related, the project is defining emojis without specific goal. Some comments in the issue explain well how the gitmojis can be used. I think Gitmoji should be neutral (such as a dictionary; without opinion) and let people decide how to use the emojis.

Some gitmojis indicate implicitly the scope such as βž• or πŸ™ˆ. Some provide the action and the scope such as πŸ’š

A placeholder for the effect of the commit on the project can be added too. I think specifically about the πŸ’₯ I don’t use it and might be used at the end of the commit message ?

With this commit message pattern, some Gitmojis are ambiguous such as πŸ”§. It does not provide a clear where, nor an clear action and mix both where and action and does not fit. They should be kept in Gitmoji but excluded in use for this convention.

Using more than one emojis make the message less readable IMHO; so using emojis for scope makes the commit harder to read. It is a possibility however. It opens the way to new gitmojis such as #321

This can be seemed as overkill and gitmojis should be kept simple anyway ! Maybe this is too much ?

So what do you think of it ? Is it to throw away; or to be improved and how ? I hope it makes the emojis less chaotic πŸ˜ƒ

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
bruxismacommented, Feb 23, 2022

Hi,

I know it’s been a while since this issue was last updated. I was wondering if moving forward with this is still planned? Having a convention commit format for gitmoji would definitely save me a ton of headaches when trying to deal with all the tooling out there that expects conventional commits these days. πŸ˜…

At the moment I’m shoving multiple shims in everywhere or writing custom regex to convert between gitmoji and conventional commits. I’d prefer to stay with gitmoji over cc, but… it’s getting harder as time goes on 😬

1reaction
carloscuestacommented, Mar 12, 2022

I think we can move forward with the approach agreed on https://github.com/carloscuesta/gitmoji/issues/442#issuecomment-1059802990, let’s include this on the website and the readme under a β€œexample of usage”

Read more comments on GitHub >

github_iconTop Results From Across the Web

πŸ”¨ [git]: Write better commits with Gitmoji - DEV Community ...
Gitmoji is an initiative to standardize and explain the use of emojis on GitHub commit messages. πŸ“ Intro : How to Write a...
Read more >
gitmoji | An emoji guide for your commit messages
Gitmoji is an emoji guide for your commit messages. Aims to be a standarization cheatshee /t for using emojis on GitHub's commit messages....
Read more >
@stackr23/gitmoji-conventional-commits - npm
Start using @stackr23/gitmoji-conventional-commits in your project by running `npm i @stackr23/gitmoji-conventional-commits`.
Read more >
How to write better commit messages? | by Sercan Üste
Some examples: πŸ› Fix database connection; ✨ Add timeline component; ♻️ Refactor form component; πŸ“ Create README.md. Generate Changelog with Gitmoji. LikeΒ ...
Read more >
Conventional Commits - Abdallah Hemdan
The type of conventional commit should be one of the following: β€’ ✨ feat: add a new feature to the codebase. β€’ πŸ“...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found