Based on the Git-flow branching model
- master
- Latest stable
- Should be based off of commit that tagged 2.4.3 from the 2.x branch
2.x
- Development release, features and fixes merged in that work and are tested
- This would normally be called ‘develop', but too many things are based off if it to change it right now
feature/1234
- Bug fixes, enhancements, features work goes here, and should be constrained to the issue number specifically, except in circumstances where that may be difficult.
- Prerequisite is an issue number and must be named in this format:
feature/{issue-number}
hotfix/1235
- Hot fix work that must based off of and go directly into master, bypassing existing work going into develop for the next release
- Issue number not required, but if in reference to it, the prerequisite is an issue number and must be named in this format:
hotfix/{issue-number}
- There is no stable branch during 3.0 development work, see next section for 3.x stable branching.
release/3.0
- Development release, features and fixes merged in that work and are tested
- Should be based off of the current 3.0-unstable branch
feature/3.0/1234
- Use
feature/1234
normally, unless you need to commit to 2.x AND 3.0, in which you would need to make the 3.0 branch asfeature/3.0/1234
- Bug fixes, enhancements, features work goes here, and should be constrained to the issue number specifically, except in circumstances where that may be difficult.
- Prerequisite is an issue number and must be named in this format:
feature/3.0/{issue-number}
2.x
- Latest stable (2.5)
- Should be based off of commit that tagged 2.5 from the master branch (prior to 3.0 stable)
- This would probably be
release/2.x
but due to legacy reasons, changing it would present some challenges for folks develop/2.x
- Development release, features and fixes merged in that work and are tested
- Should be based off of the current develop branch (prior to 3.0 stable)
feature/1234-2.x
- Use
feature/1234
normally, unless you need to commit to 2.x AND 3.x, in which you would need to make the 3.0 branch asfeature/1234-2.x
- Bug fixes, enhancements, features work goes here, and should be constrained to the issue number specifically, except in circumstances where that may be difficult.
- Prerequisite is an issue number and must be named in this format:
feature/{issue-number}
hotfix/1235-2.x
- Use
hotfix/1234
normally, unless you need to commit to 2.x AND 3.x, in which you would need to make the 3.0 branch ashotfix/1234-2.x
- Hot fix work that must based off of and go directly into master, bypassing existing work going into develop for the next release
- Issue number not required, but if in reference to it, the prerequisite is an issue number and must be named in this format:
hotfix/{issue-number}
master
- Latest stable (3.0)
- Should be based off of commit that tagged 3.0 from the
release/3.0
branch - See 2.x secondary stable for what to do with existing master
develop
- Development release, features and fixes merged in that work and are tested
- Should be based off of the current
release/3.0
branch - See 2.x secondary stable for what to do with existing develop
feature/1234
- Bug fixes, enhancements, features work goes here, and should be constrained to the issue number specifically, except in circumstances where that may be difficult.
- Prerequisite is an issue number and must be named in this format:
feature/{issue-number}
hotfix/1235
- Hot fix work that must based off of and go directly into master, bypassing existing work going into develop for the next release
- Issue number not required, but if in reference to it, the prerequisite is an issue number and must be named in this format:
hotfix/{issue-number}
- The current 1.x branch should get archived and cease to be supported, when 3.0 becomes stable.
- Until then, it will continue on as 1.x branch, and follow same structure as 2.x secondary stable above.
- We don't anticipate any future 1.x release now or prior to 3.0 stable, but we don't want to rule it out entirely, especially without notice.
$develop
= develop Branch to merge into
$feature
= Branch with feature to merge
Instructions:
- Create new local
$feature
branch from$develop
- Push / Publish
$feature
branch - Ensure Pull Request is created on GitHub.com
- PR to merge
$feature
into$develop
- Set release milestone
- Set proper labels
- Patch?
- Set assignee (yourself, lead dev, or tester)
- Complete remaining development on
$feature
(if any)
- Commit / Push additional changes to
$feature
as needed
- Pull
$develop
from remote - Merge
$develop
into$feature
- Commit
$feature
- Push
$feature
- Test code again (to ensure
$develop
or merge has not broken anything)
- If broken, follow Steps 4 through 8 again
- Verify Travis-CI passes on latest push to Pull Request
- If broken, follow Steps 4 through 8 again
- Merge Pull Request on GitHub.com
- Delete
$feature
branch
$master
= master Branch to merge into
$hotfix
= Branch with hotfix to merge
$develop
= develop Branch to merge into
Instructions:
- Create new local
$hotfix
branch from$master
- Push / Publish
$hotfix
branch - Ensure Pull Request is created on GitHub.com
- PR to merge
$hotfix
into$master
- Set release milestone
- Set proper labels
- Patch?
- Set assignee (yourself, lead dev, or tester)
- Complete remaining development on
$hotfix
(if any)
- Commit / Push additional changes to
$hotfix
as needed
- Pull
$master
from remote - Merge
$master
into$hotfix
- Commit
$hotfix
- Push
$hotfix
- Test code again (to ensure
$master
or merge has not broken anything)
- If broken, follow Steps 4 through 8 again (may want to also foll
- Verify Travis-CI passes on latest push to Pull Request
- If broken, follow Steps 4 through 8 again
- Merge Pull Request on GitHub.com
- Merge
$hotfix
into$develop
- Commit
$develop
- Push
$develop
- Delete
$hotfix
branch
- Merge develop into master
- Tag latest commit in master using the following format:
{x}.x/{x.x.x}
(the .x is literal, like3.x
)- Where {x} is the major release version (
2.x
) - Where {x.x.x} is the full release version (
2.5
)
- Push all tags
Some PHP IDEs and Git applications w/ UI support git-flow natively or through extensions. They will work great with this model, however working alongside the multiple versions (master vs 3.0 current; master vs 2.x in future) will not support the built-in master / develop / feature / hotfix / archive / release workflows for the secondary branching we've added to suit our needs.