github flow
TRANSCRIPT
Ben Mabey@bmabey
Flow
Tuesday, September 14, 2010
$ brew install git
Tuesday, September 14, 2010
$ gem install github
Tuesday, September 14, 2010Lots of nice shortcuts... Like browse, pull, etc.. Also, look at the ‘hub’ CLI tool.
$ gem install gitty
http://github.com/timcharper/gitty
Tuesday, September 14, 2010Gitty allows you to share local hooks in your git repo. One really useful one we always use is one that always updates the submodules after you checkout a new ref. We also use it to prevent evil whitespace from entering a project. :)
$ brew install git-flow
With Bash
Completion!
http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
Tuesday, September 14, 2010
$ git flow feature start super-duper
Tuesday, September 14, 2010
$ git flow feature start super-duperSummary of actions:- A new branch 'feature/super-duper' was created, based on 'sprint'- You are now on branch 'feature/super-duper'
Now, start committing on your feature. When done, use:
git flow feature finish super-duper$
Tuesday, September 14, 2010
$ git flow feature start super-duperSummary of actions:- A new branch 'feature/super-duper' was created, based on 'sprint'- You are now on branch 'feature/super-duper'
Now, start committing on your feature. When done, use:
git flow feature finish super-duper$
Based on development branch
Tuesday, September 14, 2010
$ git commit -m “[#12345678] WIP ...”
Pivotal Tracker Hook
Tuesday, September 14, 2010To automatically finish a story by using a commit message, include "fixed", "completed" or "finished" in the square brackets in addition to the story ID. You may also use different cases or forms of these verbs, such as "Fix" or "FIXES", and they may appear before or after the story ID. Note: For features, this will put the story in the 'finished' state. For chores, it will put the story in the 'accepted' state
$ git flow feature checkout diff finish list publish pull rebase start
track
Tuesday, September 14, 2010See, I told you it had bash completion.
$ git flow publish super-duper
Tuesday, September 14, 2010
$ brew install tig
Tuesday, September 14, 2010
$ brew install tig
Tuesday, September 14, 2010
$ tig2010-09-10 16:26 Ben Mabey + [feature/404-super-duper] removes blah method in favor of foo 2010-09-10 16:25 Ben Mabey * adds blah blah 2010-09-10 16:18 Ben Mabey * [origin/feature/super-duper] removes dead TODO file- not using anymore 2010-09-10 16:17 Ben Mabey * WIP 2010-09-10 12:06 Ben Mabey * [origin/sprint] [sprint] commit where branch started from
Tuesday, September 14, 2010
http://github.com/brotherbard/gitx/downloads
Tuesday, September 14, 2010
$ git flow feature rebaseWill try to rebase 'super-duper'...Current branch feature/super-duper is up to date.
Not interactive! Need to squash WIP commits.
Tuesday, September 14, 2010
$ git rebase origin/sprint --interactive (-i)
Tuesday, September 14, 2010
pick 5e78cef WIP pick 3165c4d removes dead TODO file- not using anymorepick 24e7bff adds blah blahpick 162133d removes blah method in favor of foo
Want to get rid of WIPs and false starts...
Tuesday, September 14, 2010
pick 5e78cef WIPs 24e7bff adds blah blahs 162133d removes blah method in favor of foo pick 3165c4d removes dead TODO file- not using anymore
Tuesday, September 14, 2010
$ git rebase b4472f60 -i
Protip: rebasing locally before can prevent pain
Tuesday, September 14, 2010
$ git commit -m “[Fixes #12345678] ...”
Pivotal Tracker Hook
Tuesday, September 14, 2010
To automatically finish a story by using a commit message, include "fixed", "completed" or "finished" in the square brackets in addition to the story ID. You may also use different cases or forms of these verbs, such as "Fix" or "FIXES", and they may appear before or after the story ID. Note: For features, this will put the story in the 'finished' state. For chores, it will put the story in the 'accepted' state
$ git flow publish super-duper
Tuesday, September 14, 2010
Send Pull Request
Tuesday, September 14, 2010
http://help.github.com/pull-requests/
Tuesday, September 14, 2010
$ git flow feature finish super-duper Switched to branch 'sprint'Updating 44673aa..0978c4eFast-forward 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 fooDeleted branch feature/super-duper (was 0978c4e).
Summary of actions:- The feature branch 'feature/super-duper' was merged into 'sprint'- Feature branch 'feature/super-duper' has been removed- You are now on branch 'sprint'
$
Tuesday, September 14, 2010
$ git push
GitHub will close the pull request when pushed!
Tuesday, September 14, 2010
Thanks!BenMabey.com
github.com/bmabey
Twitter: bmabey
Tuesday, September 14, 2010