Git Workflows a-la-carte

44

description

 

Transcript of Git Workflows a-la-carte

Page 1: Git Workflows a-la-carte
Page 2: Git Workflows a-la-carte

Real World Workflow

s

Page 3: Git Workflows a-la-carte

Nicola PaolucciDeveloper Advocate / Git Evangelist

@durdn

durdn.comI come out nice in

pictures, I know :-).

Page 4: Git Workflows a-la-carte

Cheap local branchingFull local history

Speed

Staging area

prominent in Open Source

Huge community

You heard has

Feature based workflow

10x the speed of svn

Distributedcryptographic integrity

Page 5: Git Workflows a-la-carte

ground breaking paradigm is ground breaking

Page 6: Git Workflows a-la-carte

Workflow building blocks

Page 7: Git Workflows a-la-carte

1

Common Practices

2

3

Collaboration model

We’ll cover how to choose:

Branching model

Continuous Integration4

Page 8: Git Workflows a-la-carte

Which collaboration model?1

Easy, right?

Page 9: Git Workflows a-la-carte

Fully decentralized Anarchy

I do my thingI do my thing, tooANARCHY

here’s mine, who tells john?

look ma, a goat!

Page 10: Git Workflows a-la-carte

Blessed repository with Gatekeeper

He is cool Gatekeeper

To have your work accepted,

Page 11: Git Workflows a-la-carte

and LieutenantsDictator

long live the King!

Lieutenants guardthe King

Blessed repository

Page 12: Git Workflows a-la-carte

Shared common

repository

we share “everything”

luckily no goats here

Centralised

Page 13: Git Workflows a-la-carte

atlassian.com/gitMore on Collaboration models

Page 14: Git Workflows a-la-carte

+ =CentralizedEnterprise

Page 15: Git Workflows a-la-carte

Centralized allows fine grained ACLs

Branch & Repo permissions

Page 16: Git Workflows a-la-carte

Integration with your

Issue tracking and CI

Page 17: Git Workflows a-la-carte

Which branching model?2

Page 18: Git Workflows a-la-carte

Product Releases1

Continuous Delivery2

Two common Branching Models

Page 19: Git Workflows a-la-carte

for Product Releases2.1

Page 20: Git Workflows a-la-carte

One Central Repository1

One Branch per Feature

One Branch per Bugfix

2

3

Tim

e

mastefeature branches

PRJ-

123-

Tim

e

mastebugfix branch

PRJ-

123-

bug-

Page 21: Git Workflows a-la-carte

Stable Branches4

Pull Requests5

master is alpha / RC6Before merges

Long running

Tim

e

mastestable branch

PRJ-

345-

bug-

desc

ript

ion

bugfix

2.2

Page 22: Git Workflows a-la-carte

2.2 for Continuous Delivery

Page 23: Git Workflows a-la-carte

master is in production1

staging is the next version

new features off staging

2

3

with branch names like: username/ISSUE-KEY-summary

promoted from staging, can receive hotfixes

Page 24: Git Workflows a-la-carte

Common Practices3

turbo boost!

Page 25: Git Workflows a-la-carte

What is a Pull Request?

Page 26: Git Workflows a-la-carte

Hey I have some code I want to merge here,

take a look?

Low friction collaboration

Pull Request

I have some code here!

Can I merge it here?

Page 27: Git Workflows a-la-carte

Single Repositoryvs

Remote Forks

Page 28: Git Workflows a-la-carte

Complete visibility1

No per Dev remotes required

KISS

2

3

Pros of a Single Repo

All feature branches available

Page 29: Git Workflows a-la-carte

Forks Are Great too BTW

Page 30: Git Workflows a-la-carte

Every one has their remote repository

With Forks

Full remote copy,each has one

Integrator, Gatekeeper,Tech Lead, etc.

Page 31: Git Workflows a-la-carte

Manage trust and maturity1

X department and 3rd parties

Dev to Dev interactions

2

3

Read “Cross”

Page 32: Git Workflows a-la-carte

Continuous Integration4

Page 33: Git Workflows a-la-carte

What happens to CI with git?1

An explosion of branches2

3 Performance degradation of build sys

Page 34: Git Workflows a-la-carte

Building everything is expensive1

Automatically build stable and master2

3 Manually trigger feature branch builds

Page 35: Git Workflows a-la-carte

Less Friction with5

Page 36: Git Workflows a-la-carte

Advantage:Integrated hooks

Page 37: Git Workflows a-la-carte

Advantage:Merge checks

Page 38: Git Workflows a-la-carte

Advantage:Fork syncing

Page 39: Git Workflows a-la-carte

In Conclusion: the recipe

Page 40: Git Workflows a-la-carte

BranchingModel

Adopt GitPractices

Automation & CI setup

Conclusions

Product workflow

Continuous delivery workflow

Embrace PR

Build automatically,

but leave knobs!

Single Repo or Forks

CollaborationModel

Centralized

Hooks, hooks everywhere

Page 41: Git Workflows a-la-carte

atlassian.com/git

More on

Page 42: Git Workflows a-la-carte

Nicola PaolucciTHANK YOU FOR YOUR ATTENTION

@durdn

durdn.comShould I change

the pic?

Page 43: Git Workflows a-la-carte

Git Repository Management for

Enterprise Teams

Free Git Code Hosting for Small Teams

Free Git Desktop client for Mac or Windows

Atlassian

Page 44: Git Workflows a-la-carte

Text code below to 22333or visit http://bit.ly/1eQ82V4

Git Workflows a-la-carte

To join this session, send text 136888 to

AWESOME = 1R

PRETTY GOOD = 1Q

NOT BAD = 1P

MEH = 1N

Rate this Talk