Project

General

Profile

Website development process » History » Version 2

Peter Amstutz, 10/18/2022 05:03 PM

1 1 Peter Amstutz
h1. Website Development process
2
3
There are two branches, "main" and "develop"
4
5
The "main" one is the main site.  When it is pushed, the site is automatically redeployed.
6
7
The "develop" goes to the "dev" version of the site.  We push to this when 
8
9
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._
10
11
The process for making changes is:
12
13
# create a new branch off of main
14 2 Peter Amstutz
## @git checkout main@
15
## @git branch my-branch@
16
## @git checkout my-branch@
17 1 Peter Amstutz
# make changes and test locally on that branch
18
# check if "develop" is even with "main" (meaning, they should have the exact same commit)
19 2 Peter Amstutz
## @git show-ref main develop@   (the branches should all have the same commit hash)
20 1 Peter Amstutz
## 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
21 2 Peter Amstutz
# using @git rebase@, apply your commits to the "develop" branch (this re-applies the changes you made in your branch, onto the develop branch)
22
## @git checkout develop@
23
## @git rebase <my-branch>@    
24 1 Peter Amstutz
# push "develop" and confirm that the dev site is displaying properly, ask other people to review it, etc
25
# fast-forward "main" to match "develop"
26 2 Peter Amstutz
## @git checkout main@
27
## @git merge --ff-only develop@