Git Workflow - TheWizardsCode/Workflows GitHub Wiki
We use a Feature Branch workflow. This page is not an exhaustive reference page, it's a crib sheet for people new to this Feature Branches.
- Review the appropriate Project Kanban to find an issue that you are going to tackle (create a new one if there isn't an appropriate issue yet)
- Assign the issue to yourself
- Move the issues card into the In Progress column of the Kanban
git checkout master
git fetch
- If necessary:
git merge master
-
git checkout -b num_description
wherenum
is the issue number from GitHub anddescription
is a 1-2 word description of the branch objective
- Complete a meaningful chunk of work
git add [appropriate files]
git commit -m "a meaningful message that describes what these changes are designed to achieve and how they contribute to resolving the issue, include a reference to the issue number with something like part of #num"
git push
- Repeat until either the issue is resolved or a usable chunk of code towards the issue is done
git rebase origin/master
git push
- Consider squashing your commits to make it easier to review.
- In GitHub issue a pull request, ensure the description fully describes what you did (from a design perspective, not an implementation perspective) and why. Ensure the description includes
Fixes #num
- Work with reviewers as necessary to have your PR merged
git checkout master
git pull
git push origin --delete <branch>
git fetch -p
git branch -D <branch>