Skip to content

Instantly share code, notes, and snippets.

@loic-roux-404
Last active March 5, 2021 21:47
Show Gist options
  • Save loic-roux-404/2755fd3fcf36c2e92a1d39623198e442 to your computer and use it in GitHub Desktop.
Save loic-roux-404/2755fd3fcf36c2e92a1d39623198e442 to your computer and use it in GitHub Desktop.
Personnal git versionning strategy

branches

According to semantic release

  • 0.0.x --> maintenance release
  • master
  • next
  • next-major
  • beta (prerelease: true)
  • alpha (prerelease: true)

The branches on which releases should happen. By default semantic-release will release:

  • regular releases to the default distribution channel from the branch master
  • regular releases to a distribution channel matching the branch name from any existing branch with a name matching a maintenance release range (N.N.x or N.x.x or N.x with N being a number)
  • regular releases to the next distribution channel from the branch next if it exists
  • regular releases to the next-major distribution channel from the branch next-major if it exists
  • prereleases to the beta distribution channel from the branch beta if it exists
  • prereleases to the alpha distribution channel from the branch alpha if it exists

Semantic Commit Messages

git hook

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

feat: add hat wobble
^--^  ^------------^
|     |
|     +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.

More Examples:

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

References:

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