Workflow
Feature Branches
Most of the time when you recieve a new task you’ll use the Feature Branch Workflow.
- Before starting on a new feature, you’ll need to pull down the most up to date version of master branch.
TIP
If you previously worked on another feature branch task you need to switch back to the master branch. git switch master
git pull origin master
This ensures that you have an up to date version of your team's most recent master
.
- Then create a new branch from
master
.
git checkout -b new-feature-branch
TIP
When naming your feature branch it is common convention to use the task code, or ticket, created by your project manager. i.e. TXEC-45
This allows everyone insight into what your feature branch is intended for.
Creating a feature branch essentially gives you your own frozen version of the master branch. It also allows you to delay pushing your commits to master until your feature is complete, which keeps the master branch in a more stable state for everyone.
There are a few caveats:
WordPress: Advanced Custom Fields
Before you begin building out your new feature branch you should update your ACF to match the master branches. This is known as syncing.