Skip to content

Instantly share code, notes, and snippets.

@DavidSouther
Last active December 15, 2015 07:39
Show Gist options
  • Save DavidSouther/5224974 to your computer and use it in GitHub Desktop.
Save DavidSouther/5224974 to your computer and use it in GitHub Desktop.
Notes for "Github Workflow"
Github Flow
Central project repository: "upstream"
Developer GH repository: "origin"
Developer local repository: "localhost"
Init:
Project:
Create branches on "upstream"
master
production
Developer:
Fork "upstream"
Clone "origin"
Reviewer:
git remote add <developer> git@github.com:<developer>/<project>
Feature:
Developer:
feature start <issue>
git checkout master
git pull --rebase upstream master
git branch [feature/]<issue> master
git checkout [feature/]<issue>
git commit
git commit
...
git rebase -i # squash commits for nice history
feature update <issue>|"all"
git co master
git pull --rebase upstream master
(if all) - for issue in $(git branch | grep 'feature/')
git co [feature/]<issue>
git rebase master
feature publish <issue>
feature update
git push -f origin [feature/]<issue>
~On Github, start new PR
~from
~Continue devel as needed
~when sharing new changes
feature update
feature publish
feature finish <issue>
~Merge PR to master
git co master
git pull --rebase upstream master
git push origin master
git branch -D [feature/]<issue>
git push origin :[feature/]<issue>
Reviewer:
~Review PR
review test <developer> <issue>
git branch --track [feature/]<developer>/<issue> <developer>/<issue>
git checkout [feature/]<developer>/<issue>
review update <developer> <issue>
git pull --rebase
review publish <developer> <issue>
git push origin [feature/]<developer>/<issue>
~Submit pull request
from origin:[feature/]<developer>/<issue>
to <developer>:[feature]/<issue>
review finish <developer> <issue>
~Developer merges PR
git branch -D [feature/]<developer>/<issue>
git push -f origin :[feature/]<developer>/<issue>
Hotfix:
As feature, but [hotfix/] and production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment