Skip to content

Instantly share code, notes, and snippets.

@beenhere4hours
Last active August 31, 2021 19:33
Show Gist options
  • Save beenhere4hours/fd108c5defe15af7006c30ebe64d9f3d to your computer and use it in GitHub Desktop.
Save beenhere4hours/fd108c5defe15af7006c30ebe64d9f3d to your computer and use it in GitHub Desktop.
my source control process based roughly on git flow

Source Control Process

cloning

git clone git@github.com:<repo name>.git

branching

Assumes fresh repo and always branching from master branch

## clone repo  
cd <RepoName>
git checkout -b <New Branch>  
git push origin --set-upstream <New Branch>

committing

Add individual files specific to an individual change.

git add <filename>
# note: message format [ticket tracker abreviation-ticket number] Call me Ishmael
git commit -m “<[MON-####] - meaningful short message>”
git push <Branch Name>

keeping up to date with remote development branch

git fetch --all
git fetch --tags
git remote prune origin
git pull --rebase
git push origin <branch name>

keeping up to date with master

git fetch --all
git fetch --tags
git remote prune origin
git pull --rebase origin master
# note: the next command will rewrite history
git push -f origin <branch name>

tag messages

git tag -a <tag number> -m “[RFC-####] - meaningful message”

promoting to master

Upon completion, if there are merge conflicts see keeping up to date with master above.

git fetch --all
git fetch --tags
git remote prune origin
git checkout master
git merge <tag number>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment