robertdoanesolomon / software-engineering-projects-pk

NERC group project
MIT License
0 stars 1 forks source link

Set up branching strategy for team to work on Issues in parallel #14

Closed tristramwalsh closed 1 year ago

tristramwalsh commented 1 year ago

Setup the branching paradigm:

Tasks for team members to create new branches

Workflow for making edits

  1. Set up a local version of the remote dev branch: git checkout --track origin/dev
  2. If you have already set up a local version of dev, then check for any remote changes to the branch from other team members by using git switch dev followed by git pull to pull any changes from the remote version of branch into local.
  3. Create your own feature branch for tackling the Issue you are working on: git switch dev -> git branch my-feature -> git switch my-feature
  4. Make changes to your code base on your my-feature branch, and commit changes to it using git commit -m "A message describing the edit made towards resolving Issue #n" - ideally you would to tag the Issue number you are working on in the commit.
  5. Once your changes have been made locally, push your local feature branch to GitHub using git push --set-upstream origin my-branch-name. If you have already done this, you can push updates on an ongoing basis simply using git push.
  6. Merge your edited feature branch into the dev branch using a Pull Request on GitHub.

Example: @sdromigny is working on Issue #7 and @sb2456 is working on #4 . Once @sdromigny has created the functions on her local sixtine-functions branch, she ensures all changes on her branch are committed, and pushes her local sixtine-functions branch to remote GitHub using git push -u origin sixtine-functions, and then merges it into dev using a Pull Request. @sb2456 pulls this updated dev branch to her local repo using git checkout --track origin/dev if you haven't already pulled the remote dev branch to local, or you update it by doing git switch dev -> git pull. You then create pull these updates into your sarah-tests branch using git switch sara-tests -> git merge dev to merge the new functions in dev into the test feature branch. From there, commit new tests to the sarah-tests branch, then once done push the udpated branch using git push -u sarah-tests, then on GitHub merge that branch into dev using a Pull Request...

tristramwalsh commented 1 year ago

Is useful, here is the branch workflow for everyone @robertdoanesolomon @rhi-ackland @sb2456 @sdromigny @tristramwalsh to use 🌳