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.

Setup a working branch

  1. 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)
  2. Assign the issue to yourself
  3. Move the issues card into the In Progress column of the Kanban
  4. git checkout master
  5. git fetch
  6. If necessary: git merge master
  7. git checkout -b num_description where num is the issue number from GitHub and description is a 1-2 word description of the branch objective

Do your work in the branch, commit early, commit often

  1. Complete a meaningful chunk of work
  2. git add [appropriate files]
  3. 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"
  4. git push
  5. Repeat until either the issue is resolved or a usable chunk of code towards the issue is done

Prepare for pushing upstream

  1. git rebase origin/master
  2. git push
  3. Consider squashing your commits to make it easier to review.

Issue a pull request

  1. 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
  2. Work with reviewers as necessary to have your PR merged

Tidy up your repo

  1. git checkout master
  2. git pull
  3. git push origin --delete <branch>
  4. git fetch -p
  5. git branch -D <branch>
⚠️ **GitHub.com Fallback** ⚠️