Skip to content

Instantly share code, notes, and snippets.

@HarisSpahija
Last active September 12, 2019 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HarisSpahija/8d5a0f3995c98d63626ccfa5b8baa418 to your computer and use it in GitHub Desktop.
Save HarisSpahija/8d5a0f3995c98d63626ccfa5b8baa418 to your computer and use it in GitHub Desktop.
Git standard based off the Angular.js git standard that I use in projects.
id title
git-style-guide
Git Style Guide

Git version control is how we work together as a team. Naming branches and writing commit messages helps us keep a easy-to-understand history of the changes in the project.

Naming Git branches

Create a branch name, with the ID number of the GitHub issue, in the following style: type-###-yourhandle-slug. Example: feat-123-impactmass-permissions, fix-222-spencern-shopify-hooks

Writing commit messages

Make atomic commits in the Git commit message guidelines from Angular.js, with a (type): followed by subject.

All of the types:

  • 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 or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

Note the following styles:

  • Use the imperative, present tense: use "change", not "changed" nor "changes"
  • Do not capitalize first letter
  • No dot (.) at the end
  • Use BREAKING CHANGES: to note breaking changes

Examples:

    (feat): add sendEmail() job
    (docs): add doc for sendEmailJob() method
    (refactor): replace Blaze component with React component

    BREAKING CHANGES: remove Header Blaze template. To migrate to the React component, use HeaderComponent.

See more examples from Angular.js.

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