Skip to content

Instantly share code, notes, and snippets.

@damianesteban
Created September 28, 2016 18:20
Show Gist options
  • Save damianesteban/c6498117e1b2d2881163f30a0acbe947 to your computer and use it in GitHub Desktop.
Save damianesteban/c6498117e1b2d2881163f30a0acbe947 to your computer and use it in GitHub Desktop.
git commit and branch naming

Git Branch Naming

Type

Must be one of the following:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests
  • task: Changes to the build process or auxiliary tools and libraries such as documentation generation
  • patch: A patch
  • proto: New code in the app's Playground for prototyping purposes.

Issue Number

  • the issue number on Github, for example 12*.

Abbreviated name of the issue

  • Example:

    • Issue: A trainer should be able to add appointments to their calendar

    • Abbreviated Name: trainer-can-add-appointments

Putting it all together

  • Example branch name:

feat/12-trainer-can-add-appointments

Git Commits

To get started, please read this article.

Example of a good git commit message:

Refactor api manager to use protocols

Examples of not-so-nice (bad) git commit messages:

refactored the api manager to use protocols.

api manager was refactored to use protocols

I refactored the api manager

the api manager rul3Z after I refactored it!

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