User Tools

Site Tools


development:conventions

Conventions

Github

Branch Naming

Basic Rules

  1. Lowercase and Hyphen-separated: Stick to lowercase for branch names and use hyphens to separate words. For instance, feature/new-login or bugfix/header-styling.
  2. Alphanumeric Characters: Use only alphanumeric characters (a-z, 0–9) and hyphens. Avoid punctuation, spaces, underscores, or any non-alphanumeric character.
  3. No Continuous Hyphens: Do not use continuous hyphens. feature–new-login can be confusing and hard to read.
  4. No Trailing Hyphens: Do not end your branch name with a hyphen. For example, feature-new-login- is not a good practice.
  5. Descriptive: The name should be descriptive and concise, ideally reflecting the work done on the branch.

Branch Prefixes

  1. Feature Branches: These branches are used for developing new features. Use the prefix feature/. For instance, feature/login-system.
  2. Bugfix Branches: These branches are used to fix bugs in the code. Use the prefix bugfix/. For example, bugfix/header-styling.
  3. Hotfix Branches: These branches are made directly from the production branch to fix critical bugs in the production environment. Use the prefix hotfix/. For instance, hotfix/critical-security-issue.
  4. Release Branches: These branches are used to prepare for a new production release. They allow for last-minute dotting of i’s and crossing t’s. Use the prefix release/. For example, release/v1.0.1.

Pull Request Conventions

Title

  1. For a single commit, the title is the subject line of the commit message.
  2. Otherwise, the title should summarize the set of commits.

Description

  1. Must state the why and the how for the change.
    1. Usually this is the body of your commit message.
  2. Must explain the purpose of the PR, e.g.:
    1. feedback for an initial implementation,
    2. request for comment,
    3. ready to merge.
  3. Explain any context:
    1. is it part of a greater set of changes?
    2. are any concurrent PRs (in other repositories) dependent on this PR?
development/conventions.txt · Last modified: 2024/06/06 16:41 by 127.0.0.1