Commits
Many companies don't pay attention to conventional commits, we do, because we like to have a clean project history and workflows to read. Most of us use Git Graph, an extension that allows us to read our Git history as a graph. Our commits convention is inspired by Conventional Commits 1.0.0 but customized into something more fun! ๐
Structure
The commit message should be structured as follows and in lowercase:
<gitmoji> <type> <description> [(#<issue number>)]
[optional body]
[optional footer(s)]
Example:
๐ update documentation contributors
- Add @jerembdn as a contributor
- Add @younesbessa as a contributor
Co-authored-by: Younes Bessa <younes@onruntime.com>
But most of the time we avoid wasting a lot of time on it so it looks more like this:
๐ update documentation contributors
Gitmojis
We use gitmoji to categorize our commits, it has a good ecosystem and is very easy to use on a daily basis using these tools.
Otherwise here is the complete list of these emojis, their code and the description given to them:
Emoji | Code | Description |
---|---|---|
๐จ | :art: | Improve structure / format of the code. |
โก๏ธ | :zap: | Improve performance. |
๐ฅ | :fire: | Remove code or files. |
๐ | :bug: | Fix a bug. |
๐๏ธ | :ambulance: | Critical hotfix. |
โจ | :sparkles: | Introduce new features. |
๐ | :memo: | Add or update documentation. |
๐ | :rocket: | Deploy stuff. |
๐ | :lipstick: | Add or update the UI and style files. |
๐ | :tada: | Begin a project. |
โ | :white_check_mark: | Add, update, or pass tests. |
๐๏ธ | :lock: | Fix security or privacy issues. |
๐ | :closed_lock_with_key: | Add or update secrets. |
๐ | :bookmark: | Release / Version tags. |
๐จ | :rotating_light: | Fix compiler / linter warnings. |
๐ง | :construction: | Work in progress. |
๐ | :green_heart: | Fix CI Build. |
โฌ๏ธ | :arrow_down: | Downgrade dependencies. |
โฌ๏ธ | :arrow_up: | Upgrade dependencies. |
๐ | :pushpin: | Pin dependencies to specific versions. |
๐ท | :construction_worker: | Add or update CI build system. |
๐ | :chart_with_upwards_trend: | Add or update analytics or track code. |
โป๏ธ | :recycle: | Refactor code. |
โ | :heavy_plus_sign: | Add a dependency. |
โ | :heavy_minus_sign: | Remove a dependency. |
๐ง | :wrench: | Add or update configuration files. |
๐จ | :hammer: | Add or update development scripts. |
๐ | :globe_with_meridians: | Internationalization and localization. |
โ๏ธ | :pencil2: | Fix typos. |
๐ฉ | :poop: | Write bad code that needs to be improved. |
โช๏ธ | :rewind: | Revert changes. |
๐ | :twisted_rightwards_arrows: | Merge branches. |
๐ฆ๏ธ | :package: | Add or update compiled files or packages. |
๐ฝ๏ธ | :alien: | Update code due to external API changes. |
๐ | :truck: | Move or rename resources (e.g.: files, paths, routes). |
๐ | :page_facing_up: | Add or update license. |
๐ฅ | :boom: | Introduce breaking changes. |
๐ฑ | :bento: | Add or update assets. |
โฟ๏ธ | :wheelchair: | Improve accessibility. |
๐ก | :bulb: | Add or update comments in source code. |
๐ป | :beers: | Write code drunkenly. |
๐ฌ | :speech_balloon: | Add or update text and literals. |
๐๏ธ | :card_file_box: | Perform database related changes. |
๐ | :loud_sound: | Add or update logs. |
๐ | :mute: | Remove logs. |
๐ฅ | :busts_in_silhouette: | Add or update contributor(s). |
๐ธ | :children_crossing: | Improve user experience / usability. |
๐๏ธ | :building_construction: | Make architectural changes. |
๐ฑ | :iphone: | Work on responsive design. |
๐คก | :clown_face: | Mock things. |
๐ฅ | :egg: | Add or update an easter egg. |
๐ | :see_no_evil: | Add or update a .gitignore file. |
๐ธ | :camera_flash: | Add or update snapshots. |
โ๏ธ | :alembic: | Perform experiments. |
๐๏ธ | :mag: | Improve SEO. |
๐ท๏ธ | :label: | Add or update types. |
๐ฑ | :seedling: | Add or update seed files. |
๐ฉ | :triangular_flag_on_post: | Add, update, or remove feature flags. |
๐ฅ | :goal_net: | Catch errors. |
๐ซ | :dizzy: | Add or update animations and transitions. |
๐๏ธ | :wastebasket: | Deprecate code that needs to be cleaned up. |
๐ | :passport_control: | Work on code related to authorization, roles and permissions. |
๐ฉน | :adhesive_bandage: | Simple fix for a non-critical issue. |
๐ง | :monocle_face: | Data exploration/inspection. |
โฐ๏ธ | :coffin: | Remove dead code. |
๐งช | :test_tube: | Add a failing test. |
๐ | :necktie: | Add or update business logic. |
๐ฉบ | :stethoscope: | Add or update healthcheck. |
๐งฑ | :bricks: | Infrastructure related changes. |
๐งโ๐ป | :technologist: | Improve developer experience. |
๐ธ | :money_with_wings: | Add sponsorships or money related infrastructure. |
๐งต | :thread: | Add or update code related to multithreading or concurrency. |
๐ฆบ | :safety_vest: | Add or update code related to validation. |
Types
We use the following commit types:
Type | Description |
---|---|
add | Add a new feature |
fix | Fix a bug |
improve | Improve something |
update | Update something |
remove | Remove something |
refactor | Refactor something |
rename | Rename something |
move | Move a file or folder |
upgrade | Upgrade dependencies |
downgrade | Downgrade dependencies |
Description
The description should be a short description of the commit, it should be written in the imperative, present tense. For example:
# Good
๐ update documentation contributors
# Bad
๐ updated documentation contributors
Issue number
If the commit is related to an issue, you can add the issue number at the end of the description, for example:
๐ update documentation contributors (#123)
Body
The body should include the motivation for the change and contrast this with previous behavior. It should be written in the imperative, present tense. For example:
# Good
๐ update documentation contributors
- Add @jerembdn as a contributor
- Add @younesbessa as a contributor
Co-authored-by: Younes Bessa <younes@onruntime.com>
# Bad
๐ update documentation contributors
- Added @jerembdn as a contributor
- Added @younesbessa as a contributor
Co-authored-by: Younes Bessa <younes@onruntime.com>