-
Notifications
You must be signed in to change notification settings - Fork 2
Git
Brandon Bouchard edited this page Nov 22, 2022
·
4 revisions
%%{init: { 'logLevel': 'debug', 'theme': 'base' } }%%
gitGraph
commit
commit
branch feature_branch
checkout feature_branch
commit
checkout main
commit
commit
checkout feature_branch
commit
commit
checkout main
merge feature_branch
commit
First do a git pull
on you local main branch to ensure that it is up-to-date with origin/main.
When starting a new bucket of work, create and checkout a feature branch, using git checkout -b {branch_name}
with the following naming convention:
utopia-{jira-ticket-#}
Note: Scope commits into meaningful and granular changes.
Make a GitHub Pull Request and be ready to receive and address comments from your peers.
Once the Pull Request has been approved, it is time to merge your feature branch into the main branch.
git rebase
-
git rebase -it HEAD~{# of commits back}
<-- use this to start an interactive rebase (a.k.a. squash) -
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
<-- This creates a log that is much easier to parse than the standard output
This the wiki footer for BC Government's DPIA product.