Website development process » History » Revision 2
Revision 1 (Peter Amstutz, 08/11/2022 07:02 PM) → Revision 2/4 (Peter Amstutz, 10/18/2022 05:03 PM)
h1. 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. We push to this when 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 git checkout main@ main ## @git git branch my-branch@ my-branch ## @git git checkout my-branch@ 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 git show-ref main develop@ 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@, "git rebase", apply your commits to the "develop" branch (this re-applies the changes you made in your branch, onto the develop branch) ## @git git checkout develop@ develop ## @git git rebase <my-branch>@ <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 git checkout main@ main ## @git git merge --ff-only develop@ develop