Git commit workflow
Current process of committing to the general and projects repositories:
- cd to the desired repository.
- git pull
- Make changes to the repository.
- git add the files you want to commit.
- git commit -m "Message that you want to write."
- git push
Git development standards
master/main branch is the live version, it\'s published directly from the repository
dev branch will act as a \"test\" or \"staging\" branch, where all content in development will ultimately pass through before being published
I sometimes develop straight on the dev branch, but I would prefer not to. Sometimes I just forget.
We will create feature branches for either specific tickets or groupings of tickets.
When a feature is complete, a PR is created to merge the feature branch into dev
When the PR is completed, the branch will be deleted
After testing on dev, we will PR dev into master with a tagged release version
- Sometimes if changes are small, I don\'t increment versions
For React apps, anyone can perform the version bump and tag:
git checkout dev
yarn release (major|minor|patch)
Create and merge PR
yarn post-merge
For example, this morning I completed a ticket to \"fix the cesium map\" page, but we had decided to remove it instead. This was my workflow:
git checkout dev
git pull
git checkout -b remove-cesium
git push --set-upstream origin remove-cesium
Perform development.
Commit working code
yarn release patch
Open GitHub and create PR from remove-cesium into master (ideally I should have done into dev, but I didn\'t need to perform testing, and new PR\'s go to master by default). Assure version number, i.e. v1.7.7 is the first part of the PR (if it has a version number available)
Merge the PR and delete the branch
git checkout master
git pull
yarn post-merge
git checkout dev
git merge master
git push
git branch -D remove-cesium