Actions
Website Development process¶
There are two branches, "main" and "develop"
The "main" one is the main site. When it is pushed, the site is automatically redeployed.
The "develop" goes to the "dev" version of the site. This gives us a live preview of what the site will be like.
To avoid a confusing edit history, we want "develop" and "main" to always share the same history, with "develop" having additional changes being previewed prior to merging. If we start merging "main" and "develop" back and forth we'll get spaghetti history and it'll be hard to keep track of which changes have been made, and where.
The process for making changes is:
- create a new branch off of main
git checkout main
git branch my-branch
git checkout my-branch
- make changes and test locally on that branch
- check if "develop" is even with "main" (meaning, they should have the exact same commit)
git show-ref main develop
(the branches should all have the same commit hash)- if "develop" is ahead of "main" then someone else is working on previewing/merging a change (they're on step 5), check in with them
- using
git rebase
, apply your commits to the "develop" branch (this re-applies the changes you made in your branch, onto the develop branch)git checkout develop
git rebase <my-branch>
- push "develop" and confirm that the dev site is displaying properly, ask other people to review it, etc
- fast-forward "main" to match "develop"
git checkout main
git merge --ff-only develop
- Now you can push to main
git push origin
Updated by Peter Amstutz about 2 years ago · 4 revisions