The Feature-Branch Workflow on GitHub

A recipe for collaborative projects using Git and GitHub

Photo by Rubaitul Azad on Unsplash

The Main Branch

Feature Branches

Trunk-Based Development

General Settings

Adding Collaborators

Rules

Pull Request Templates

  1. To make the template visible and store the file in the repository’s root directory.
  2. To make the template visible and store the file in the repository’s docs directory.
  3. To make the template not visible and store the file in a hidden directory named .github.

Naming Conventions

For branches

  • feature/ISSUE1_my_new_endpoint
  • bugfix/ISSUE2_business_logic_correction
  • hotfix/ISSUE3_security_issue
  • tests/ISSUE4_my_new_test
  • refactor/ISSUE5_memory_optimization

For commits and PRs

Git Tags

  • MAJOR for major incompatible changes (breaking changes).
  • MINOR for new functionalities (backwards compatible changes).

Release tags

Pre-release tags

Summary

--

--

Software Engineer & Professional Nerd

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store