Skip to content

2. Branching

Jarno SeppΓ€nen edited this page May 16, 2025 · 5 revisions

Branching Strategy

This document outlines the branching strategy and naming conventions to maintain consistency and clarity in our development process.


πŸ“‚ Branch Prefixes

Use the following prefixes to categorize your branches:

  • feature: New features
  • bug: Bug fixes
  • hotfix: Urgent, critical fixes
  • enhancement: Improvements to existing features
  • refactor: Code refactoring
  • docs: Documentation updates
  • test: Adding or updating tests
  • chore: Non-functional tasks (e.g., dependency updates)
  • perf: Performance improvements
  • style: Code style changes (e.g., formatting, whitespace)

πŸ“ Naming Convention

Branch names should follow this structure for better traceability:

<username>/<prefix>/<issue-number and short-description>

Examples:

  • joni/feature/1-add-authentication
  • peter/bug/12-fix-login-issue
  • parker/hotfix/123-resolve-database-error

πŸš€ Creating a Branch

⚠️ All branches must be created from the dev branch to ensure they are based on the latest development code.

Follow these steps to create a branch:

  1. Go to the Issues page in GitHub and locate the issue you're working on.

  2. Assign the issue to yourself to prevent overlapping work.

    Assign issue
  3. Create the branch using the link on the right. Follow the naming convention and ensure you set the branch source to dev.

    Set branch source Branch naming
  4. After creating the branch, add it to the project board under the "In Progress" column to keep your tasks organized.

    Add to project board
  5. Verify that your new branch is visible in VS Code under Source Control. Alternatively, you can pull the branch using other GitHub tools like GitHub Desktop.

    VS Code branch Pull branch

🧠 Best Practices

  • Keep it focused: Avoid including multiple unrelated tasks in a single branch to maintain a clean and organized codebase.
  • Be descriptive: Use clear and concise descriptions in your branch names to make them easily identifiable.
  • Commit Regularly and Push Often: Please don't keep commits only locally; push them regularly so we can track the project's progress and ensure you have a remote backup of your code β€”at least at the end of each workday.

Clone this wiki locally