-
Notifications
You must be signed in to change notification settings - Fork 0
06. Feature Branch Workflow
This page describes how feature branches are used in this project. It focuses only on creating, naming, and working within feature branches.
A feature branch is a short-lived branch used to implement one user story or task.
Feature branches help to:
- isolate new functionality
- keep the develop branch stable
- allow parallel work within the team
All feature branches must follow this naming pattern:
[feature/]
Rules:
- use lowercase letters
- use hyphens
-to separate words - keep the name short and descriptive
- start with the branch type (
feature/,fix/,chore/) followed by a short description separated by hyphens
Examples:
feature/login-page
fix/user-auth-bug
chore/ci-cd-pipeline
Feature branches are always created from develop.
git checkout develop git pull origin develop git checkout -b feature/your-feature-name
This ensures your feature branch is based on the latest development state.
When working on a feature branch:
- implement only one user story or task
- commit changes incrementally
- use clear and meaningful commit messages
git add . git commit -m "Add login form validation"
The following screenshots demonstrate the practical usage of the feature/chore branch workflow in this project.
This screenshot shows the current list of branches in the repository, including:
- the
developandmainbranches - multiple
feature/*,fix/*, andchore/*branches - consistent usage of the agreed naming conventions
This screenshot demonstrates creating a new branch from develop using the naming convention:
chore/article-service-unit-test.
This screenshot shows pushing the newly created branch to GitHub and setting the upstream branch, making it ready for collaboration and pull requests.