in root.html). Outputs custom og:image with assets_prefix normalisation and non-Google site verification. --> Git Workflow Best Practices for Modern Teams | zer0-mistakes in _layouts/root.html. What this file adds: - Custom og:image with preview_images.assets_prefix path normalisation for the theme-specific page.preview and page.header.og_image keys. When page.image is set, jekyll-seo-tag handles og:image and this file skips its own og:image output to avoid duplicate tags. - Non-Google site verification tags (Bing, Yandex, Naver, Baidu) Dependencies: - jekyll-seo-tag plugin (loaded in _layouts/root.html via Git Workflow Best Practices for Modern Teams | zer0-mistakes ) - site.preview_images config in _config.yml =================================================================== --> Git Workflow Best Practices for Modern Teams | zer0-mistakes Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-04-13 14:33 UTC
Current Environment Production
Build Time Apr 13, 14:33
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Quick Links
Page Location
Page Info
Layout article
Collection posts
Path _posts/development/2025-01-22-git-workflow-best-practices.md
URL /posts/2025/01/22/git-workflow-best-practices/
Date 2025-01-22
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

Git Workflow Best Practices for Modern Teams

Effective version control is the backbone of modern software development. This guide covers Git workflows that will help your team collaborate more efficiently.

Choosing the Right Workflow

Git Flow

Git Flow is ideal for projects with scheduled releases:

# Create a feature branch
git checkout -b feature/new-login develop

# Work on your feature
git add .
git commit -m "feat: implement OAuth login"

# Merge back to develop
git checkout develop
git merge --no-ff feature/new-login

Branch Structure:

  • main - Production-ready code
  • develop - Integration branch
  • feature/* - New features
  • release/* - Release preparation
  • hotfix/* - Production fixes

GitHub Flow

A simpler alternative for continuous deployment:

# Create feature branch from main
git checkout -b feature/user-dashboard main

# Push and create PR
git push -u origin feature/user-dashboard
gh pr create --title "Add user dashboard"

# After review, merge to main
gh pr merge --squash

Commit Message Conventions

Follow the Conventional Commits specification:

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

[optional body]

[optional footer]

Types:

  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation
  • style: - Formatting
  • refactor: - Code restructuring
  • test: - Adding tests
  • chore: - Maintenance

Code Review Best Practices

For Authors

  1. Keep PRs small and focused
  2. Write descriptive PR descriptions
  3. Self-review before requesting reviews
  4. Respond to feedback constructively

For Reviewers

  1. Review promptly (within 24 hours)
  2. Be constructive, not critical
  3. Ask questions instead of making demands
  4. Approve when “good enough”

Handling Merge Conflicts

# Update your branch with latest changes
git fetch origin
git rebase origin/main

# Resolve conflicts in your editor
# Then continue the rebase
git add .
git rebase --continue

# Force push your updated branch
git push --force-with-lease

Conclusion

A well-defined Git workflow reduces friction, improves code quality, and makes collaboration enjoyable. Choose the workflow that fits your team’s needs and iterate as you learn.