Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnnymatthews/7bf9b48f1b79ed6b3791ed09b3604704 to your computer and use it in GitHub Desktop.
Save johnnymatthews/7bf9b48f1b79ed6b3791ed09b3604704 to your computer and use it in GitHub Desktop.
Semantic commit messages for documentation.

I'm sure we've all seen Git repos with a shocking amount of branches. Without a decent naming convention, things can get messy real quick. The idea here is that adding the tags below to the start of your branch makes it easier for folks to quickly figure out what your trying to do.

These are the available types:

Type Description Example
feat Adds a new section or page. New paragraphs to existing documentation are not a feature. feat/desktop-install
add Adds a new paragraph, sentence, or image to existing documentation. add/desktop-install-screenshots
remove Removes existing paragraphs, sentences, or images from existing documentation remove/browser-disclaimer
fix Fixes an existing typo, spelling, grammar, or formatting mistake. feat/desktop-broken-repo-link
refactor Completely changes an existing section or page while keeping the original narrative/purpose. Refactors are changes to documentation that do not result from a platform/package/software release. refactor/simplifies-dht-explanation
update Changes to existing documentation due to platform/package/software releases. Updates to documentation as a direct result of updates to platforms/packages/software releases. update/install-section-go-ipfs-0-7
chore Updates automation, CircleCI tasks, linting rules, etc. Chores do not fix documentation. chore/redirects-for-concepts-section

For example:

feat/ipfs-desktop-install
^--^  ^------------^
|     |
|     +-> Summary of your changes
|
+-------> Type: feat, add, remove, fix, refactor, update, or chore.

Using these rules when creating a pull request title won't make you a better person, but it might improve your Git repository. I based this post on a GitHub gist from joshbuchea's called semantic-commit-messages.md.

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