Skip to content

Contributor Documentation

Sirin Puenggun edited this page Nov 10, 2023 · 1 revision

Branching Strategy

Trunk-Based Development

We follow a trunk-based development strategy, which means that the main branch, often referred to as 'trunk' or 'master,' is the primary branch for development. Feature development is done directly on the main branch or short-lived feature branches.

We are a small team so we will work as a pair where the pair reviews pull requests of each other.

Feature Branching

For each significant feature or task, create a dedicated branch. This branch should be short-lived and merged back into the main branch promptly after completion.

Update from main as much as possible to avoid large conflicts.

Naming Convention for Branches

Feature Branches

Feature branches should be named with a clear and descriptive format:

feature/{brief-description}

For example:

feature/user-authentication

Bugfix Branches

If you are addressing a bug, name the branch as follows:

bugfix/{brief-description-or-bug-number}

For example:

bugfix/fix-login-issue

Hotfix or Fix Branches

Hotfix branches are for urgent fixes in production but Fix branches are fixes of some features in development. Name them like:

hotfix/{brief-description}
fix/{brief-description}

For example:

hotfix/resolve-security-vulnerability

Workflow

  1. Clone the Repository:
    git clone https://github.com/TurTaskProject/TurTaskWeb

  2. Create a Feature Branch:
    git checkout -b feature/descriptive-feature-name

  3. Make Changes and Commit and Update from main regularly:

       # Update from main
       git fetch
       git rebase origin/master
       # Make Changes and Commit
       git add .
       git commit -m "Your commit message"
  4. Push Changes:
    git push origin feature/descriptive-feature-name

  5. Create a Pull Request:

    • Open a pull request from your feature branch to the main branch.
    • Provide a clear title and description for your changes.
    • Assign reviewers if necessary.
  6. Review and Merge:

    • Address any feedback from reviewers.
    • Once approved, merge your branch into the main branch.

Clone this wiki locally