Skip to content

Instantly share code, notes, and snippets.

@gorenje
Created May 4, 2012 14:30
Show Gist options
  • Save gorenje/2595128 to your computer and use it in GitHub Desktop.
Save gorenje/2595128 to your computer and use it in GitHub Desktop.
git flow on the command line with hub
For this to work, i use a commit hook that automagically includes a ref #... in all commits on
a feature branch ===> https://gist.github.com/1012062
This also assumes that you have a remote called 'wooga' that is the master of your fork. The owner
of the master repository is also assumed to be 'wooga'.
prompt(master)> git-fetch-all ## see https://gist.github.com/1012002
prompt(master)> git merge wooga/master ## update local master
prompt(master)> git push ## update origin, i.e. my fork
prompt(master)> hub github-issues
1. MW / FB does not have unique keys
2. ML & MW support staging deploy to test translations
3. What is the requirement for images?
4. Per game requirements for Import/Export
...
prompt(master)> hub feature-branch -i 2 ## create feature branch with issue number and title
prompt(issue_2_ML___MW_support_staging_deploy_)> oe README ## open readme in emacs
prompt(issue_2_ML___MW_support_staging_deploy_)> git commit -a -m 'fix the worlds problems'
Commit message is now:
-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<-8<
commit f6cf0309304285a9528c5525ffeb4bc42ab7bde4
Author: Gerrit Riessen <gerrit.riessen@gmail.com>
Date: Fri May 4 16:27:30 2012 +0200
fixed the worlds problems
refs #2
On branch: issue_2_ML___MW_support_staging_deploy_
->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8->8
prompt(issue_2_ML___MW_support_staging_deploy_)> git co master
prompt(master)> git push origin issue_2_ML___MW_support_staging_deploy_ ## the refs ensures that commit is attached to the issue
prompt(master)> hub pull-request -i 2 -b wooga:master -h gorenje:issue_7_add_rvmrc ## issue now becomes pull request
### rinse and repeat
hub is used explicitly to show what is hub and what is git native, normally "alias git=hub".
these steps are very verbose and updates and fetches aren't done all the time. usually it's just
1) make feature branch, 2) makes changes, 3) commit, 4) push and 5) pull-request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment