main we don't touch until final commit, to keep it always in "published" status for a hypothetical person using the repo.
dev branch is our development branch, where we merge each of our updates into over time to share our work with each other.
issue-name branches are branched off from dev by each team member locally using.
Tasks for team members to create new branches
[x] Create dev branch on GitHub
[x] Protect master branch on GitHub to prevent accidental merges into it
[x] Clone remote repo to local using git clone [url]
Workflow for making edits
Set up a local version of the remote dev branch: git checkout --track origin/dev
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.
Create your own feature branch for tackling the Issue you are working on: git switch dev -> git branch my-feature -> git switch my-feature
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.
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.
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...
Setup the branching paradigm:
main
we don't touch until final commit, to keep it always in "published" status for a hypothetical person using the repo.dev
branch is our development branch, where we merge each of our updates into over time to share our work with each other.issue-name
branches are branched off fromdev
by each team member locally using.Tasks for team members to create new branches
dev
branch on GitHubmaster
branch on GitHub to prevent accidental merges into itgit clone [url]
Workflow for making edits
dev
branch:git checkout --track origin/dev
dev
, then check for any remote changes to the branch from other team members by usinggit switch dev
followed bygit pull
to pull any changes from the remote version of branch into local.git switch dev
->git branch my-feature
->git switch my-feature
my-feature
branch, and commit changes to it usinggit 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.git push --set-upstream origin my-branch-name
. If you have already done this, you can push updates on an ongoing basis simply usinggit push
.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 localsixtine-functions
branch to remote GitHub usinggit push -u origin sixtine-functions
, and then merges it intodev
using a Pull Request. @sb2456 pulls this updateddev
branch to her local repo usinggit checkout --track origin/dev
if you haven't already pulled the remotedev
branch to local, or you update it by doinggit switch dev
->git pull
. You then create pull these updates into yoursarah-tests
branch usinggit switch sara-tests
->git merge dev
to merge the new functions indev
into the test feature branch. From there, commit new tests to thesarah-tests
branch, then once done push the udpated branch usinggit push -u sarah-tests
, then on GitHub merge that branch intodev
using a Pull Request...