Forked from rishavpandey43/git-commit-styleguide.md
Created
December 15, 2022 10:52
-
-
Save gmsotavio/a3c56bacbebc121754917414de182800 to your computer and use it in GitHub Desktop.
Revisions
-
rishavpandey43 revised this gist
Sep 24, 2020 . 1 changed file with 139 additions and 66 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,73 +1,95 @@ # Git Commit Messages Style-Guides - Use the present tense ("Add feature" not "Added feature") - Use the imperative mood ("Move cursor to..." not "Moves cursor to...") - Limit the first line to 72 characters or less - Reference issues and pull requests liberally after the first line - When only changing documentation, include `[ci skip]` in the commit title - Consider starting the commit message with an applicable emoji # Types | Type | Description | | :--------------: | ------------------------------------------------- | | `new` | for new feature implementing commit | | `feat / feature` | for new feature implementing commit (equal `new`) | | `update` | for update commit | | `bug` | for bug fix commit | | `security` | for security issue fix commit | | `performance` | for performance issue fix commit | | `improvement` | for backwards-compatible enhancement commit | | `breaking` | for backwards-incompatible enhancement commit | | `deprecated` | for deprecated feature commit | | `i18n` | for i18n (internationalization) commit | | `a11y` | for a11y (accessibility) commit | | `refactor` | for refactoring commit | | `docs` | for documentation commit | | `example` | for example code commit | | `test` | for testing commit | | `deps` | for dependencies upgrading or downgrading commit | | `config` | for configuration commit | | `build` | for packaging or bundling commit | | `release` | for publishing commit | | `wip` | for work in progress commit | | `chore` | for other operations commit | # Emojis | Emoji | Raw Emoji Code | Type | Description | | :-------------------------: | ----------------------------- | ------------------------- | ------------------------------------------------------ | | :star: | `:star:` | `new` or `feat / feature` | add **new feature** | | :bug: | `:bug:` | `bug` | fix **bug** issue | | :ambulance: | `:ambulance:` | `bug` | ciritial hotfix **bug** issue | | :lock: | `:lock:` | `security` | fix **security** issue | | :chart_with_upwards_trend: | `:chart_with_upwards_trend:` | `performance` | fix **performance** issue | | :zap: | `:zap:` | `improvement` | update **backwards-compatible** feature | | :boom: | `:boom` | `breaking` | update **backwards-incompatible** feature | | :warning: | `:warning:` | `deprecated` | **deprecate** feature | | :globe_with_meridians: | `:globe_with_meridians:` | `i18n` | update or fix **internationalization** | | :wheelchair: | `:wheelchair:` | `a11y` | update or fix **accessibility** | | :rotating_light: | `:rotating_light:` | `refactor` | remove **linter**/strict/deprecation warnings | | :shirt: | `:shirt:` | `refactor` | **refactoring** or code **layouting** | | :white_check_mark: | `:white_check_mark:` | `test` | add **tests**, fix **tests** failur or **CI** building | | :pencil: | `:pencil:` | `docs` | update **documentation** | | :copyright: | `:copyright:` | `docs` | decide or change **license** | | :lollipop: | `:lollipop:` | `example` | for **example** or **demo** codes | | :lipstick: | `:lipstick:` | `update` | update **UI/Cosmetic** | | :up: | `:up:` | `update` | update **other** | | :truck: | `:truck:` | `update` | **move** or **rename** files, repository, ... | | :twisted_rightwards_arrows: | `:twisted_rightwards_arrows:` | `update` | merge **conflict resolution** | | :heavy_plus_sign: | `:heavy_plus_sign:` | `update` | **add** files, dependencies, ... | | :heavy_minus_sign: | `:heavy_minus_sign:` | `update` | **remove** files, dependencies, ... | | :on: | `:on:` | `update` | **enable** feature and something ... | | :arrow_up: | `:arrow_up:` | `deps` | upgrade **dependencies** | | :arrow_down: | `:arrow_down:` | `deps` | downgrade **dependencies** | | :pushpin: | `:pushpin:` | `deps` | pin **dependencies** | | :wrench: | `:wrench:` | `config` | update **configuration** | | :package: | `:package:` | `build` | **packaging** or **bundling** or **building** | | :hatching_chick: | `:hatching_chick:` | `release` | **initial** commit | | :confetti_ball: | `:confetti_ball:` | `release` | release **major** version | | :tada: | `:tada:` | `release` | release **minor** version | | :sparkles: | `:sparkles:` | `release` | release **patch** version | | :rocket: | `:rocket:` | `release` | **deploy** to production enviroment | | :bookmark: | `:bookmark:` | `release` | **tagged** with version label | | :back: | `:back:` | `revert` | **revert** commiting | | :construction: | `:construction:` | `wip` | **WIP** commiting | ## Example 1 (single line commit message) ``` :star: feat: add new feature ^----^ ^---^ ^------------^ | | | | | +-> Summary in present tense. | | | +-------> Type: | chore, docs, feat, fix, refactor, style, test, etc. | +-------> Emoji: :tada: :bookmark: :sparkles: :bug: :books: :wrench: :truck: ``` Examples: - `feat:` Add a new feature (equivalent to a MINOR in [Semantic Versioning](https://semver.org/)). @@ -85,9 +107,60 @@ - `chore:` Update something without impacting the user (updating grunt tasks bump a dependency in package.json. no production code change). ## Example 2(multi-line commit message) All Commit Message Format **MUST** meet this Text Format: ``` [:<Emoji>: ][<Type>[(<Scope>)]: ]<Subject> [<BLANK LINE>] [<Message Body>] [<BLANK LINE>] [<Message Footer>] ``` ### Scope The scope could be anything specifying place or category of the commit change. For example $location, $browser, $compile, $rootScope, ngHref, ngClick, ngView, feature1, etc... ### Subject The subject contains succinct description of the change: - use the imperative, present tense: "change" not "changed" nor "changes" - don't capitalize first letter - no dot (.) at the end ### Message Body Just as in the **Subject**, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior. ### Message Footer The Message Footer should contain any information about **Notes** and also Message Footer should be **recommended** [GitHub Issue](https://github.com/features#issues) ID Reference, Ex. `Issue #27`, `Fixes #1`, `Closes #2`, `Resolves #3`. **Notes** should start with the word `NOTE:` with a space or two newlines. The rest of the commit message is then used for this. Examples: new: ``` :star: new(graphite): add 'graphiteWidth' option ``` bug fix: ``` :bug: fix(graphite): stop graphite breaking when width < 0.1 Closes #28 ``` References: - [https://www.conventionalcommits.org/](https://www.conventionalcommits.org/) - [https://seesparkbox.com/foundry/semantic_commit_messages](https://seesparkbox.com/foundry/semantic_commit_messages) - [http://karma-runner.github.io/1.0/dev/git-commit-msg.html](http://karma-runner.github.io/1.0/dev/git-commit-msg.html) - [https://dev.to/maxpou/enhance-your-git-log-with-conventional-commits-3ea4](https://dev.to/maxpou/enhance-your-git-log-with-conventional-commits-3ea4) - [https://github.com/kazupon/git-commit-message-convention](https://github.com/kazupon/git-commit-message-convention) -
rishavpandey43 revised this gist
Mar 13, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,4 +89,5 @@ References: - [https://www.conventionalcommits.org/](https://www.conventionalcommits.org/) - [https://seesparkbox.com/foundry/semantic_commit_messages](https://seesparkbox.com/foundry/semantic_commit_messages) - [http://karma-runner.github.io/1.0/dev/git-commit-msg.html](http://karma-runner.github.io/1.0/dev/git-commit-msg.html) - [https://dev.to/maxpou/enhance-your-git-log-with-conventional-commits-3ea4](https://dev.to/maxpou/enhance-your-git-log-with-conventional-commits-3ea4) -
rishavpandey43 created this gist
Mar 13, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,92 @@ # Git Commit Messages Styleguides - Use the present tense ("Add feature" not "Added feature") - Use the imperative mood ("Move cursor to..." not "Moves cursor to...") - Limit the first line to 72 characters or less - Reference issues and pull requests liberally after the first line - When only changing documentation, include `[ci skip]` in the commit title - Consider starting the commit message with an applicable emoji: | Commit type | Emoji | |:---------------------------|:----------------------------------------------| | Initial commit | :tada: `:tada:` | | Version tag | :bookmark: `:bookmark:` | | New feature | :sparkles: `:sparkles:` | | Bugfix | :bug: `:bug:` | | Metadata | :card_index: `:card_index:` | | Documentation | :books: `:books:` | | Documenting source code | :bulb: `:bulb:` | | Performance | :racehorse: `:racehorse:` | | Cosmetic | :lipstick: `:lipstick:` | | Tests | :rotating_light: `:rotating_light:` | | Adding a test | :white_check_mark: `:white_check_mark:` | | Make a test pass | :heavy_check_mark: `:heavy_check_mark:` | | General update | :zap: `:zap:` | | Improve format/structure | :art: `:art:` | | Refactor code | :hammer: `:hammer:` | | Removing code/files | :fire: `:fire:` | | Continuous Integration | :green_heart: `:green_heart:` | | Security | :lock: `:lock:` | | Upgrading dependencies | :arrow_up: `:arrow_up:` | | Downgrading dependencies | :arrow_down: `:arrow_down:` | | Lint | :shirt: `:shirt:` | | Translation | :alien: `:alien:` | | Text | :pencil: `:pencil:` | | Critical hotfix | :ambulance: `:ambulance:` | | Deploying stuff | :rocket: `:rocket:` | | Fixing on MacOS | :apple: `:apple:` | | Fixing on Linux | :penguin: `:penguin:` | | Fixing on Windows | :checkered_flag: `:checkered_flag:` | | Work in progress | :construction: `:construction:` | | Adding CI build system | :construction_worker: `:construction_worker:` | | Analytics or tracking code | :chart_with_upwards_trend: `:chart_with_upwards_trend:` | | Removing a dependency | :heavy_minus_sign: `:heavy_minus_sign:` | | Adding a dependency | :heavy_plus_sign: `:heavy_plus_sign:` | | Docker | :whale: `:whale:` | | Configuration files | :wrench: `:wrench:` | | Package.json in JS | :package: `:package:` | | Merging branches | :twisted_rightwards_arrows: `:twisted_rightwards_arrows:` | | Bad code / need improv. | :hankey: `:hankey:` | | Reverting changes | :rewind: `:rewind:` | | Breaking changes | :boom: `:boom:` | | Code review changes | :ok_hand: `:ok_hand:` | | Accessibility | :wheelchair: `:wheelchair:` | | Move/rename repository | :truck: `:truck:` | | Other | [Be creative](http://www.emoji-cheat-sheet.com/) | #### Example ``` :sparkles: feat: add hat wobble ^------^ ^---^ ^------------^ | | | | | +-> Summary in present tense. | | | +-------> Type: | chore, docs, feat, fix, refactor,style, test, etc. | +-------> Emoji: :tada: :bookmark: :sparkles: :bug: :books: :wrench: :truck: ``` More Examples: - `feat:` Add a new feature (equivalent to a MINOR in [Semantic Versioning](https://semver.org/)). - `fix:` Fix a bug (equivalent to a PATCH in [Semantic Versioning](https://semver.org/)). - `docs:` Documentation changes(update, delete, create documents). - `style:` Code style change (formatting, missing semi colons, etc; no production code change.). - `refactor:` Refactor code(refactoring production code, eg. renaming a variable). - `perf:` Update code performances. - `test:` Add test to an existing feature(adding missing tests, refactoring tests; no production code change). - `chore:` Update something without impacting the user (updating grunt tasks bump a dependency in package.json. no production code change). References: - [https://www.conventionalcommits.org/](https://www.conventionalcommits.org/) - [https://seesparkbox.com/foundry/semantic_commit_messages](https://seesparkbox.com/foundry/semantic_commit_messages) - [http://karma-runner.github.io/1.0/dev/git-commit-msg.html](http://karma-runner.github.io/1.0/dev/git-commit-msg.html)