Skip to content

Git Workflow

Company conventions for working with Git at Etnetera.

Branches

We use GitFlow with the following branch types:

BranchDescriptionExample
mainProduction code
developIntegration branch
feature/*New functionalityfeature/user-login
fix/*Bug fixfix/null-pointer-crash
hotfix/*Critical production fixhotfix/payment-failure
release/*Release preparationrelease/2.5.0

Commit Messages

We use Conventional Commits:

<type>(<scope>): <description>

[optional body]

[optional notes]

Commit Types

TypeDescription
featNew feature
fixBug fix
docsDocumentation only
styleFormatting, whitespace (no logic change)
refactorRefactoring without new feature or fix
testAdding or updating tests
choreMaintenance, dependencies, CI

Examples

feat(auth): add Google OAuth login

fix(api): fix error on empty request body

docs(readme): update installation instructions

Merge Request (MR)

  1. Branch off from develop (or main for hotfixes)
  2. Push and create an MR in GitLab
  3. Add a description — what and why
  4. Assign at least 1 reviewer from the team
  5. CI must be green before merging
  6. The MR is merged by the author after approval (not the reviewer)

Rule

Never push directly to main or develop. Always go through an MR.

Git Configuration

Set your identity before your first commit:

bash
git config --global user.name "Your Name"
git config --global user.email "name@etnetera.cz"
git config --global core.editor "code --wait"   # VS Code

Common Commands

bash
# New branch
git checkout -b feature/my-feature develop

# Sync with develop
git fetch origin
git rebase origin/develop

# Interactive rebase (clean up commits before MR)
git rebase -i origin/develop

Etnetera a.s. — IT Team