git branch design code example
Example: branching strategy github
Our test framework is separate repo from the
application code repo. Automation framework
has a smaller code base, and fewer people
are involved. so we do not have a very
complicated branching strategy
We have master and develop branches(buffer branch)
in our automation framework repository.
Once I have a story from jira, I create
a new branch from the develop branch with
the issue number of my jira story and check out.
git branch <branchName>
git checkout -b vyt-59I
write my automated tests on this branch.
Once completed, I create a pull request
so that my code can be reviewed. Once my team
reviews the code, my branch is merged into develop.
After code is merged, I delete the branch.
git branch -d <branch_name>
Then get another story from jira, create
new branch for that one ... At the end of every
sprint, (or quarter) we merge with master.
My daily automated smoke from Jenkins runs
against the master branch.
Master branch is stable since we only
merge into with once a sprint.