Skip to content

Instantly share code, notes, and snippets.

@ciatph
Last active May 25, 2022 03:34
Show Gist options
  • Save ciatph/28ece434447f14d50706787b6a42fa6e to your computer and use it in GitHub Desktop.
Save ciatph/28ece434447f14d50706787b6a42fa6e to your computer and use it in GitHub Desktop.
A list of industry-standard Git commit messages for reference

Standard Git Commit Message Reference

Below is a list of industry-standard Git commit messages featured by Tuasegun on his [blog post] for reference.

Your commit message should be:

  • Understandable
  • Enough
  • Unambiguous

Before coming up with a commit message you should consider:

  • Why did I add this commit
  • What changes does this commit make
  • Are the changes necessary
  • Do the changes solve any ticket or do they refer to any external links or part of the code

Different standard commit types we can look into (according to @Tuasegun):

  • fix: This is to commit a resolved bug in the codebase

  • feat: This is to commit a new feature to the code base

  • chore: This commits changes that are not related to a feature or a bug it involves modification or updating dependencies

  • refactor - this commits changes that involve refactored code, doesn’t include refactored code or changes

  • docs - This commits changes made on the documentation, readme.md or markdown filed

  • style - This involves style changes in the codebase

  • test - This commits changes made in the test file including corrections made

  • perf - This commits to improve the app's performances

  • ci - This commits make changes in the CI integration like the files and scripts

  • build - These are files that involve the build files and blue dependency

  • revert - This commit signifies reverting to a previous commit

Example

git commit -m "feat: Add withdrawal button on home page"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment