Skip to content

Change Management Practices

mariekers edited this page Aug 20, 2019 · 8 revisions

Overview

Developers need to be working on a similar code base to avoid merge conflicts between their branch and the master branch. To ensure that this doesn't happen, we adhere to the following practices.

Individual Branch

When an individual is working on an issue, their branch will contain changes relevant to that issue (and that issue alone). When the developer is done with that issue, they will create a pull request to merge that branch to the develop branch. To create a new branch, the developer starts with the most current version of develop (git fetch && git checkout develop && git pull --rebase origin develop), then checks out a new branch git checkout -b <branch name>. Individual branches should only be created off of the develop branch.

To ensure that the branch is consistent with the working environment, the developer checks the status of their working branch with the git branch by running git status.

Committing to the Branch

git status

git add <file path or '.'>

git commit -m "<commit message>"

git push origin <branch name>

Develop Branch

The develop branch is the the working branch for all individuals.

Creating New Branch

When a developer starts a new issue, they will do a git fetch, then checkout develop (git checkout develop). They then need to ensure that their code base is consistent with develop by running git pull --rebase origin develop and merge develop into their repo git merge develop.

Maintaining Branch

It is possible that changes can be made to develop as the developer is working on their individual branch. Before generating a PR, developers need to fetch changes to develop git fetch, ensure that the rest of their repo is consistent with develop (git pull --rebase origin develop) and then merge the develop changes to their branch git merge develop.

Master Branch

The master branch is the deploy-able copy of the project. Once enough work has been vetted and added to the develop branch, the develop branch is merged with the master branch.