carloscuesta / gitmoji

An emoji guide for your commit messages. 😜
https://gitmoji.dev
MIT License
15.79k stars 802 forks source link

Should gitmoji be codes or actual emoji characters? #527

Closed matejdro closed 4 years ago

matejdro commented 4 years ago

Hello :sunglasses:!

Gitmoji seems like a pretty good idea,

however one thing confuses me: Are commit messages supposed to contain codes (such as :bug:) or actual emoji characters (such as πŸ›)? What is the accepted practice?

I've gone through git log of this repository with terminal (which does not replace any emoji codes) and some commits contained codes while other contained emoji characters.

KaKi87 commented 4 years ago

See @vhoyer @johannchopin, that's what #489 is about.

johannchopin commented 4 years ago

Hey @matejdro πŸ‘‹

Initially, gitmoji only refer to emoji shortcode like :bug:. But as you can see, not all tools support emoji shortcode so thats why I personally always use the emoji directly like πŸ›. #420 introduce the feature of copy the emoji directly in the website but for efficiency I prefer to use the browser extension. You can also use gitmoji-cli if you use git in the command line.

So there is no accepted practice you can just use both πŸ‘

johannchopin commented 4 years ago

@KaKi87 Not really πŸ€” He just ask what is the accepted practice between :bug: and πŸ›. Not which tools doesn't support emoji shortcode.

KaKi87 commented 4 years ago

Well, choice depends on support.

johannchopin commented 4 years ago

The choice should be to be supported on all platform (that's why I use the emoji directly) πŸ˜‰

vhoyer commented 4 years ago

I prefer to use shortcode on git, because it's easier to search for commits

KaKi87 commented 4 years ago

The choice should be to be supported on all platform (that's why I use the emoji directly)

Actually, not all terminal emulators supports unicode emojis.

matejdro commented 4 years ago

It is pretty hard decision.

Pros for shortcode:

Pros for direct emoji:

vhoyer commented 4 years ago

well, you can always use the gitmoji-log to see the emojis on your terminal haha, while on IDE I don't know if that has a fix :shrug:

When I started using gitmoji I always typed everything, so when I see :bento: or :chart_with_upwards_trend: I know exactly what they stand for :sweat_smile:

carloscuesta commented 4 years ago

You can use both of them, it's up to you to decide what format do you want to use!

johannchopin commented 4 years ago

Close the issue since the question has an answer πŸ‘

Buzut commented 4 years ago

My 2 cents

A while ago, I opted for an Emojis-based commit guideline inspired by Angular's commit rules. The exact same question rose up and I asked on StackOverflow.

As it turns out, there is no one size fits all answer to this tricky matter. In the end, I came to the conclusion that:

The almost perfect answer

I use Git Hooks to dynamically convert the typed shortcodes into proper Unicode Emojis. This offers a double advantage:

This led me to create Git Emojis Hook. So feel free to have a look at it and tweak it to your liking, or just clone and use πŸ™ˆ

johannchopin commented 4 years ago

@Buzut Really like the project that you have created ⭐ Be aware that it doesn't follow the gitmoji syntax. Since I'm a developer I always have a browser tab open on my second screen so it is really fast to get the emoji using the browser extensionπŸš€

KaKi87 commented 4 years ago

the vast majority of terminals and IDEs we spend our time in support Unicode

possibility to customise the shortcodes used. :perf: has more meaning than :rocket: when the commit is performance related for instance.

Except the gitmoji for performance is :zap:, while :rocket: is the gitmoji for deployment. xD

Buzut commented 4 years ago

@KaKi87 well, it appears that Windows terminal supports Unicode (and Emojis) in recent versions.

In addition, more and more tools will move to supporting Emojis as time passes.

As for the Emoji choice, I’m not imposing anything. As I said, feel free to customize it to your needs.

Git Emoji Hook is based on Angular’s commit rules and replaced the commit type text based flag by an Emoji. The choice is arbitrary, but that’s just me, I never pretended to follow Gitmoji’s conventions.

KaKi87 commented 4 years ago

@KaKi87 well, it appears that Windows terminal supports Unicode (and Emojis) in recent versions.

2020-08-08 13_05_51-Windows PowerShell

2020-08-08 13_06_55-Windows PowerShell