github flow

27
Ben Mabey @bmabey Flow Tuesday, September 14, 2010

Upload: ben-mabey

Post on 15-Jul-2015

5.391 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Github flow

Ben Mabey@bmabey

Flow

Tuesday, September 14, 2010

Page 2: Github flow

$ brew install git

Tuesday, September 14, 2010

Page 3: Github flow

$ gem install github

Tuesday, September 14, 2010Lots of nice shortcuts... Like browse, pull, etc.. Also, look at the ‘hub’ CLI tool.

Page 4: Github flow

$ 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. :)

Page 5: Github flow

$ brew install git-flow

With Bash

Completion!

http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/

Tuesday, September 14, 2010

Page 6: Github flow

$ git flow feature start super-duper

Tuesday, September 14, 2010

Page 7: Github flow

$ 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

Page 8: Github flow

$ 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

Page 9: Github flow

$ 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

Page 10: Github flow

$ git flow feature checkout diff finish list publish pull rebase start

track

Tuesday, September 14, 2010See, I told you it had bash completion.

Page 11: Github flow

$ git flow publish super-duper

Tuesday, September 14, 2010

Page 12: Github flow

$ brew install tig

Tuesday, September 14, 2010

Page 13: Github flow

$ brew install tig

Tuesday, September 14, 2010

Page 14: Github flow

$ 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

Page 15: Github flow

http://github.com/brotherbard/gitx/downloads

Tuesday, September 14, 2010

Page 16: Github flow

$ 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

Page 17: Github flow

$ git rebase origin/sprint --interactive (-i)

Tuesday, September 14, 2010

Page 18: Github flow

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

Page 19: Github flow

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

Page 20: Github flow

$ git rebase b4472f60 -i

Protip: rebasing locally before can prevent pain

Tuesday, September 14, 2010

Page 21: Github flow

$ 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

Page 22: Github flow

$ git flow publish super-duper

Tuesday, September 14, 2010

Page 23: Github flow

Send Pull Request

Tuesday, September 14, 2010

Page 24: Github flow

http://help.github.com/pull-requests/

Tuesday, September 14, 2010

Page 25: Github flow

$ 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

Page 26: Github flow

$ git push

GitHub will close the pull request when pushed!

Tuesday, September 14, 2010

Page 27: Github flow

Thanks!BenMabey.com

github.com/bmabey

Twitter: bmabey

Tuesday, September 14, 2010