Repositories
https://github.wdig.com/GXTools/gxtools
Structure
master
This is a special branch of Axis which is always in a production ready state. Only complete, stable features may be merged into this branch. Release builds will always be built from master.
develop
This is a specific branch where active development is performed. Active development may be in the form of individual commits or merges from a feature branch.
Branches
Release Branches
Release branches are staging areas for releases. The only commits to a release branch should be bug fixes. Release branches should be named like release-5.1 for Axis 5.1.0 and related maintenance builds (eg: 5.1.1, 5.1.2, etc).
Feature Branches
Feature branches are used to develop full features, which likely correspond to a story. As such, it may be prudent to name the feature branch as diwcpct-xyz where xyz is the ticket number of the story. Alternatively, it can be the name of the feature prefixed by feature-.
Tags
Version Tags
Version tags will always be generated from the master branch and will have the format vX.Y.Z, where X is the major version, Y is the minor version, and Z is the maintenance version.
Other Tags
Tags required for any other purpose can have any name other than version tag described above.
Continuous Delivery
develop Branch
The develop branch will be continuously delivered to http://dev01.d1.gxtools.net/, and if the build is stable, http://qa1.gtools.net/. It may then be manually approved for delivery to http://int1.gxtools.net/, though ideally only release-* branches will be delivered to http://int1.gxtools.net/.
release-* Branches
The release-* branches will be continuously delivered to http://dev02.d1.gxtools.net/, and if the build is stable, http://qa2.gxtools.net/. It may then be manually approved for delivery to http://int1.gxtools.net/.
master Branch
The master branch will be continuously delivered to https://stage.gxtools.net/. Upon manual approval, it will be delivered to https://gxtools.net/.
Tasks
Branching
Creating a Release Branch
Command Line
Starting from the develop branch, checkout a new release branch
git checkout develop git checkout -b release-1.0 git push origin release-1.0
Github
While viewing the develop branch in the repository, expand the branch selection and type in the name of the branch into the Find or create a branch... text field. It will prompt you to create the branch if it does not exist. Click on the prompt to create the branch from the currently selected branch.
Merging
Command Line
Assuming you have modified a release branch, you will need to merge it back into the develop and master branches
# Merge back to develop branch git checkout develop git pull git merge release-1.0 git push origin develop # Merge into master git checkout master git pull git merge release-1.0 git push origin master
Github
Merging is not possible via Github.
Tagging
Once code has been merged into master and is ready for deploy, the deploy should be tagged for future identification.
git checkout master git tag v1.0.0 git push --tags
Github
Tagging is not possible via Github
Links
- http://nvie.com/posts/a-successful-git-branching-model/
- https://www.sonassi.com/knowledge-base/our-magento-git-guide-and-work-flow/ has a mapping of svn/git commands
