Paul McGrath. Speedy Input Speedy Visualisation Speedy Workflow.

17
Speedy Git Paul McGrath

Transcript of Paul McGrath. Speedy Input Speedy Visualisation Speedy Workflow.

Page 1: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Speedy GitPaul McGrath

Page 2: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Contents

Speedy InputSpeedy VisualisationSpeedy Workflow

Page 3: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Speedy Commands

git push master~2:master git pull –rebase

(git fetch origin, git rebase origin/master)

Page 4: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Speedy Commands

Interactive rebase (rebase –i)

Page 5: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Speedy Aliases (.gitconfig)

Page 6: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Using your favourite text editor

In ~/.bashrc and ~/bin My editor is much easier to use for

interactive rebase, commit –amend etc. Share your setup – it’s all config files

Page 7: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Console 2

Page 8: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Use your favourite log viewer

~/.bashrc:

Page 9: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

mergetool, difftool setup

Page 10: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

IF you have these problems… Features tied

together Can’t unpick the log Branching from

untested code

Your product is the sum of independent features

Features can be easily removed

You have a safe point to branch from

Page 11: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Git workflow

Git docs: Branching strategy (http://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows)

Page 12: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Not like this…

Page 13: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Create a safe branching point http://

scottchacon.com/2011/08/31/github-flow.html

git merge develop Keep it as light-weight as possible …Yeah, but what about conflicts?

DEVELOP

MASTER

MY LOVELY FEATURE

Page 14: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Speedy Branches

Avoiding conflicts Small commits merge safe point into branches Even better… rebase!

…Yeah, but I don’t want to see all these branches all over our repo…

Page 15: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Github forks

Page 16: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Speedy Integration

Page 17: Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.

Speedy Git