Flow
                              Ben Mabey
                              @bmabey
Tuesday, September 14, 2010
$ brew install git




Tuesday, September 14, 2010
$ gem install github




Tuesday, September 14, 2010
Lots of nice shortcuts... Like browse, pull, etc.. Also, look at the ...
$ gem install gitty


                                              http://github.com/timcharper/gitty




Tuesday, Septem...
ash
                                                                                    th B ion!
                        ...
$ git flow feature start super-duper




Tuesday, September 14, 2010
$ git flow feature start super-duper
   Summary of actions:
   - A new branch 'feature/super-duper' was created, based on ...
Based on development branch

   $ git flow feature start super-duper
   Summary of actions:
   - A new branch 'feature/sup...
Pivotal Tracker Hook


                        $ git commit -m “[#12345678] WIP ...”




Tuesday, September 14, 2010
To au...
$ git flow feature
                 checkout   diff       finish   list
                 publish   pull        rebase   st...
$ git flow publish super-duper




Tuesday, September 14, 2010
$ brew install tig




Tuesday, September 14, 2010
$ brew install tig




Tuesday, September 14, 2010
$ tig
   2010-09-10 16:26 Ben Mabey          + [feature/404-super-duper]
   removes blah method in favor of foo
   2010-09...
http://github.com/brotherbard/gitx/downloads




Tuesday, September 14, 2010
$ git flow feature rebase
                Will try to rebase 'super-duper'...
                Current branch feature/super...
$ git rebase origin/sprint --interactive
                                (-i)




Tuesday, September 14, 2010
pick       5e78cef   WIP
             pick       3165c4d   removes dead TODO file- not using anymore
             pick    ...
pick 5e78cef WIP
             s 24e7bff adds blah blah
             s 162133d removes blah method in favor of foo
        ...
$ git rebase b4472f60 -i




    Protip: rebasing locally before can prevent pain




Tuesday, September 14, 2010
Pivotal Tracker Hook


                $ git commit -m “[Fixes #12345678] ...”




Tuesday, September 14, 2010
To automati...
$ 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..0978c4e
    Fast-forward
     ...
$ git push


      GitHub will close the pull request when pushed!




Tuesday, September 14, 2010
Thanks!
                              BenMabey.com
              github.com/bmabey
                              Twitter: ...
Upcoming SlideShare
Loading in …5
×

Github flow

6,115 views

Published on

3 Comments
6 Likes
Statistics
Notes
  • @msorenson Thanks for the link for future viewers. This presentation predates that blog post by about a year and hence the name confusion. The presentation is basically git flow + github PRs so I called it github flow.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • the title of the presentation is 'Github flow' but the content actually pertains mostly to 'git flow'. Two quite different flows for different folks. More here http://scottchacon.com/2011/08/31/github-flow.html
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • This new tool makes working with pull requests via the command line really nice: http://thechangelog.com/post/2878756980/git-pulls-command-line-tool-for-github-pull-requests
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
6,115
On SlideShare
0
From Embeds
0
Number of Embeds
272
Actions
Shares
0
Downloads
30
Comments
3
Likes
6
Embeds 0
No embeds

No notes for slide

Github flow

  1. 1. Flow Ben Mabey @bmabey Tuesday, September 14, 2010
  2. 2. $ brew install git Tuesday, September 14, 2010
  3. 3. $ gem install github Tuesday, September 14, 2010 Lots of nice shortcuts... Like browse, pull, etc.. Also, look at the ‘hub’ CLI tool.
  4. 4. $ gem install gitty http://github.com/timcharper/gitty Tuesday, September 14, 2010 Gitty 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. :)
  5. 5. ash th B ion! Wi et Co mpl $ brew install git-flow http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ Tuesday, September 14, 2010
  6. 6. $ git flow feature start super-duper Tuesday, September 14, 2010
  7. 7. $ git flow feature start super-duper Summary 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
  8. 8. Based on development branch $ git flow feature start super-duper Summary 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
  9. 9. Pivotal Tracker Hook $ git commit -m “[#12345678] WIP ...” 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
  10. 10. $ git flow feature checkout diff finish list publish pull rebase start track Tuesday, September 14, 2010 See, I told you it had bash completion.
  11. 11. $ git flow publish super-duper Tuesday, September 14, 2010
  12. 12. $ brew install tig Tuesday, September 14, 2010
  13. 13. $ brew install tig Tuesday, September 14, 2010
  14. 14. $ tig 2010-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
  15. 15. http://github.com/brotherbard/gitx/downloads Tuesday, September 14, 2010
  16. 16. $ git flow feature rebase Will 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
  17. 17. $ git rebase origin/sprint --interactive (-i) Tuesday, September 14, 2010
  18. 18. pick 5e78cef WIP pick 3165c4d removes dead TODO file- not using anymore pick 24e7bff adds blah blah pick 162133d removes blah method in favor of foo Want to get rid of WIPs and false starts... Tuesday, September 14, 2010
  19. 19. pick 5e78cef WIP s 24e7bff adds blah blah s 162133d removes blah method in favor of foo pick 3165c4d removes dead TODO file- not using anymore Tuesday, September 14, 2010
  20. 20. $ git rebase b4472f60 -i Protip: rebasing locally before can prevent pain Tuesday, September 14, 2010
  21. 21. Pivotal Tracker Hook $ git commit -m “[Fixes #12345678] ...” 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
  22. 22. $ git flow publish super-duper Tuesday, September 14, 2010
  23. 23. Send Pull Request Tuesday, September 14, 2010
  24. 24. http://help.github.com/pull-requests/ Tuesday, September 14, 2010
  25. 25. $ git flow feature finish super-duper Switched to branch 'sprint' Updating 44673aa..0978c4e Fast-forward 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo Deleted 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
  26. 26. $ git push GitHub will close the pull request when pushed! Tuesday, September 14, 2010
  27. 27. Thanks! BenMabey.com github.com/bmabey Twitter: bmabey Tuesday, September 14, 2010

×