Created
May 4, 2012 14:30
-
-
Save gorenje/2595128 to your computer and use it in GitHub Desktop.
git flow on the command line with hub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]> | |
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