Sign In Create Account
Gitflow Workflow

Gitflow Workflow

Organized feature development and release management using the proven Gitflow model.

Branch Structure

We follow the Gitflow workflow for organized feature development and releases.

  • main: Production-ready code only
  • develop: Integration branch for features
  • feature/*: Individual feature branches
  • release/*: Release preparation branches
  • hotfix/*: Emergency production fixes

Gitflow Benefits

  • Clear Separation: Production code stays stable in main
  • Parallel Development: Multiple features can be developed simultaneously
  • Release Management: Dedicated branches for release preparation
  • Emergency Fixes: Hotfixes can be applied without disrupting development

Feature Development

All new features should be developed in dedicated feature branches created from develop.

Feature Branch Workflow

# Start a new feature from develop
git checkout develop
git pull origin develop
git checkout -b feature/user-authentication

# Work on your feature
git add .
git commit -m "feat: add user login functionality"
git commit -m "feat: add password validation"
git commit -m "test: add authentication tests"

# Push feature branch
git push -u origin feature/user-authentication

# Create pull request to develop branch
# After code review and approval, squash and merge

Feature Branch Best Practices

  • • Use descriptive branch names: feature/user-dashboard
  • • Keep features small and focused on single functionality
  • • Regularly rebase with develop to avoid conflicts
  • • Delete feature branch after successful merge

Release Process

Release branches are used to prepare new production releases and finalize version-specific changes.

Release Branch Workflow

# Create release branch from develop
git checkout develop
git pull origin develop
git checkout -b release/1.2.0

# Finalize release (version bumps, changelog, etc.)
git add .
git commit -m "chore: bump version to 1.2.0"

# Merge to main and tag
git checkout main
git merge --no-ff release/1.2.0
git tag -a v1.2.0 -m "Release version 1.2.0"

# Merge back to develop
git checkout develop
git merge --no-ff release/1.2.0

# Push everything
git push origin main develop --tags

# Delete release branch
git branch -d release/1.2.0
git push origin --delete release/1.2.0

Release Branch Activities

  • • Version number updates in package.json, etc.
  • • Changelog generation and updates
  • • Final bug fixes and minor adjustments
  • • Documentation updates for the release

Hotfix Process

Hotfixes address critical production issues that can't wait for the next planned release.

Hotfix Workflow

# Create hotfix from main
git checkout main
git pull origin main
git checkout -b hotfix/critical-security-fix

# Make the fix
git add .
git commit -m "fix: resolve security vulnerability in auth"

# Merge to main and tag
git checkout main
git merge --no-ff hotfix/critical-security-fix
git tag -a v1.2.1 -m "Hotfix version 1.2.1"

# Merge to develop
git checkout develop
git merge --no-ff hotfix/critical-security-fix

# Push and cleanup
git push origin main develop --tags
git branch -d hotfix/critical-security-fix
git push origin --delete hotfix/critical-security-fix

⚠️ Hotfix Guidelines

  • • Only for critical production issues
  • • Keep changes minimal and focused
  • • Always merge back to both main and develop
  • • Increment patch version number