Search

Search IconIcon to open search

Workflows

Last updatedUpdated: by Jakub Žovák · 2 min read

Properties
tags cscs/swe
created 03.10.2024, 14:16
modified 19.07.2026, 17:45
published Empty
sources Empty
topics Git Workflows, Feature Branching, Trunk-Based Development, Gitflow, Version Control
authors Empty
ai-assisted No

# Feature Branching Git Workflow

  • In this workflow, a separate branch is created for each feature being worked on. Developers work on their respective feature branches and only merge them into the main branch when the feature is complete.
  • Pros:
    • The main branch contains only finished and stable code.
    • Features can be developed and maintained independently without affecting the main branch.
  • Cons:
    • Managing feature branches becomes challenging when multiple developers work on the same feature.
    • Longer branch lifespans can lead to complex merging conflicts.

# Trunk-based Development Git Workflow (Develop Branch)

  • This workflow is similar to feature branching but introduces a trunk (or develop) branch that acts as an intermediary. New features are merged into the trunk branch first, which is then tested before merging to the main branch.

  • Pros:
    • All features are tested together before merging into the main branch.
    • The main branch stays clean and stable.
    • Minor code changes can be made quickly without breaking the main branch.
  • Cons:
    • Adds complexity to repository management with extra merging steps.
    • Developers need to resolve conflicts locally.
    • Requires regular updates to keep the main branch current.

# Gitflow Git Workflow

  • This workflow builds upon the trunk-based workflow by adding two new branches: Release and Hotfix. The release branch is used for testing and bug fixes before a feature is merged into the main branch. The hotfix branch is used for emergency patches directly on the main branch.
  • This workflow is considered to be legacy by Atlassian.

  • Pros:
    • Provides a structured way to test features before releasing.
    • Allows for swift, isolated fixes through hotfix branches.
  • Cons:
    • Introduces more complexity with additional branches.
    • Requires strict discipline to manage release and hotfix branches effectively.