Skip to content

ressl/styleguide_git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Git StyleGuide

TOC

About

This is an attempt to standardize the format of commit messages, for the sake of uniformity in git log, best practices for writing commit messages & fun!

Using emojis at the beginning of commit messages, other than being fun, provides a simple way to indicate the intention of that commit, an ease for the eyes when browsing/reviewing git log. It's also a simple measure of the fact that how much that commit is focused on a single purpose, which is a good practice.

Git Principle

Please make as many commits as possible. The principle here is small commits. A version tag must then be set for each related change.

  • Every change must commit.
  • All related changes must be combined in a new version.
  • Every new version must be tagged.

Git Projects

  • Every project name must must be lower case.
  • Every project must have an easily recognizable name. The blanks in the project name are filled in with the character _.
  • Every project must have a description.
  • Every project must have a project avatar.
  • Projects that belong together must be marked with a project description. For example: chef_example_cookbook

README Template

Please use the README_template for normal projects. Please use the README_chef_template for chef projects.

LICENSE Template

Please use the GNU Affero General Public License v3.0 for normal projects.

Contributing Template

Please use the CONTRIBUTING for for projects.

Commit Message Format

All Git Commit Messages MUST be signed!

All Git Commit Messages MUST meet with this Text Format:

:emoji1: :emoji2: Subject
(Only One NewLine)
Message Body
(Only One NewLine)
Ref <###>

Tag Message Format

All Git Tag Messages MUST be signed!

All Git Tag Messages MUST meet with this Text Format:

Release vSemVer

Rules

  1. Capitalize the Subject.
  2. Do not end the Subject line with a period.
  3. Message Subject SHOULD Begin with at-least One Emoji(see below for list of Suggested Emojis).
  4. Message Body SHOULD End with at-least One Issue Tracking ID Reference(GitHub Issues/GitLab Issues/Phabricator Tasks), Ex. Issue #27, Ref T27 or Ref T27, T56 or Fixes T8. It's also recommanded to use Full URL to Issues, instead of just Issue ID Number; Doing so will ease browsing issues from terminal.
  5. Total Characters of the Subject Line MUST be Less than or Equal to 50 Chars Long.
  6. Wrap the Message body at 72 characters.
  7. Use Valid MarkDown format in Message Body.
  8. Use the Present Tense ("Add feature" not "Added feature").
  9. Use the Imperative Mood ("Move cursor to..." not "Moves cursor to...").
  10. Use the Message body to explain what and why vs. how.
  11. All WIP(Work In Progress) Commits MUST have the WIP Emoji(see below).

Notes

  • All WIP Commits Should be Avoided!.
  • Refrencing Issues by using special keywords like Fixes or Resolves will mark them as closed automatically! For more information about automatic issue closing using ketwords see: GitHub/GitLab/Phabricator.
  • There is a Space Character between Multiple Emojis!.
  • There is NO New-Line After the Task ID Reference Line.
  • Every Raw Emoji Text(:emoji:) is Counted as One Char!.
  • See ToDo Grammar StyleGuide for more Information on @XXX Comment Tags.

Git config and GPGsign

All commit messages and tags must be signed!

gpg --list-secret-keys --keyid-format LONG

sec   ed25519 2018-02-26 [SC] [expires: 2022-02-25]
      101D2615211421D8D22218DFD68251B5B79A051A
uid           [ultimate] Robert Ressl <[email protected]>
ssb   cv25519 2018-02-26 [E] [expires: 2022-02-25]

git config --global user.signingkey 101D2615211421D8D22218DFD68251B5B79A051A

git config --global user.name "Ressl Robert"

git config --global user.email "[email protected]"

git config --global commit.gpgsign true

git config --global tag.gpgsign true

Suggested Emojis

Most used

Emoji Raw Emoji Code Description
πŸŽ‰ :tada: Initial Commit
🎨 :art: when improving the format/structure of the code
✨ :sparkles: when introducing New Features
πŸ“° :newspaper: when creating a new file
πŸ“ :pencil: when performing minor changes/fixing the code or language
πŸ“š :books: when writing docs
πŸ› :bug: when reporting a bug, with @FIXMEComment Tag
πŸš‘ :ambulance: when fixing a bug
πŸ”₯ :fire: when removing code or files, maybe with @CHANGED Comment Tag
🚜 :tractor: when change file structure. Usually together with 🎨
πŸ”¨ :hammer: when refactoring code
β˜” :umbrella: when adding tests
πŸ’Ž :gem: New Release
πŸ”– :bookmark: Version Tags
❄️ :snowflake: changing Configuration, Usually together with 🐧 or πŸŽ€ or πŸš€
πŸŽ€ :ribbon: Customer requested application Customization, with @HACK Comment Tag
πŸš€ :rocket: Anything related to Deployments/DevOps
🀝 :handshake: when Merge files
πŸ“ :file_folder: when working with Git Submodules

Complete list

Emoji Raw Emoji Code Description
🎨 :art: when improving the format/structure of the code
πŸ“° :newspaper: when creating a new file
πŸ“ :pencil: when performing minor changes/fixing the code or language
🐎 :racehorse: when improving performance
πŸ“š :books: when writing docs
πŸ› :bug: when reporting a bug, with @FIXMEComment Tag
πŸš‘ :ambulance: when fixing a bug
🐧 :penguin: when fixing something on Linux
🍎 :apple: when fixing something on Mac OS
🏁 :checkered_flag: when fixing something on Windows
πŸ”₯ :fire: when removing code or files, maybe with @CHANGED Comment Tag
🚜 :tractor: when change file structure. Usually together with 🎨
πŸ”¨ :hammer: when refactoring code
β˜” :umbrella: when adding tests
πŸ”¬ :microscope: when adding code coverage
πŸ’š :green_heart: when fixing the CI build
πŸ”’ :lock: when dealing with security
⬆️ :arrow_up: when upgrading dependencies
⬇️ :arrow_down: when downgrading dependencies
⏩ :fast_forward: when forward-porting features from an older version/branch
βͺ :rewind: when backporting features from a newer version/branch
πŸ‘• :shirt: when removing linter/strict/deprecation warnings
πŸ’„ :lipstick: when improving UI/Cosmetic
β™Ώ :wheelchair: when improving accessibility
🌐 :globe_with_meridians: when dealing with globalization/internationalization/i18n/g11n
🚧 :construction: WIP(Work In Progress) Commits, maybe with @REVIEW Comment Tag
πŸ’Ž :gem: New Release
πŸ”– :bookmark: Version Tags
πŸŽ‰ :tada: Initial Commit
πŸ”ˆ :speaker: when Adding Logging
πŸ”‡ :mute: when Reducing Logging
✨ :sparkles: when introducing New Features
⚑ :zap: when introducing Backward-InCompatible Features, maybe with @CHANGED Comment Tag
πŸ’‘ :bulb: New Idea, with @IDEA Comment Tag
❄️ :snowflake: changing Configuration, Usually together with 🐧 or πŸŽ€ or πŸš€
πŸŽ€ :ribbon: Customer requested application Customization, with @HACK Comment Tag
πŸš€ :rocket: Anything related to Deployments/DevOps
🐘 :elephant: PostgreSQL Database specific (Migrations, Scripts, Extensions, ...)
🐬 :dolphin: MySQL Database specific (Migrations, Scripts, Extensions, ...)
πŸƒ :leaves: MongoDB Database specific (Migrations, Scripts, Extensions, ...)
🏦 :bank: Generic Database specific (Migrations, Scripts, Extensions, ...)
🐳 :whale: Docker Configuration
🀝 :handshake: when Merge files
πŸ“ :file_folder: when working with Git Submodules

Tools

  • Commit(CLI): This is a nifty CLI tool to aid in standardizing commit messages based on this document, thanks to @jakeasmith.
  • gitMoji(Chrome Extension): Enhance your commits with emojis!, thanks to @louisgrasset.

Fun Emoji Usages

  • CodeEmoji: Mozilla’s Codemoji enciphers your messages with emoji for fun and profit
  • Emoji Based Diagram: Emoji Based Diagram of Data Bearing Subscription Updates(WebPush VAPID)

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

Ask to Be Creative!

To add a new Emoji to the list: Create an Issue.

Versioning

  • v1.0.0 - Initial work
  • v1.0.1 - fix CONTRIBUTING and add template, version list
  • v1.1.0 - add add Git Principle and fix typo
  • v1.2.0 - add add Emoji πŸ“
  • v1.3.0 - add add CHANGELOG_template.md

Authors

License

The Code is licensed under the GNU Affero General Public License v3.0

Thanks to…

Releases

No releases published

Packages

No packages published