Git Workflows a-la-carte

Post on 15-Jan-2015

661 views 2 download

Tags:

description

 

Transcript of Git Workflows a-la-carte

Real World Workflow

s

Nicola PaolucciDeveloper Advocate / Git Evangelist

@durdn

durdn.comI come out nice in

pictures, I know :-).

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

ground breaking paradigm is ground breaking

Workflow building blocks

1

Common Practices

2

3

Collaboration model

We’ll cover how to choose:

Branching model

Continuous Integration4

Which collaboration model?1

Easy, right?

Fully decentralized Anarchy

I do my thingI do my thing, tooANARCHY

here’s mine, who tells john?

look ma, a goat!

Blessed repository with Gatekeeper

He is cool Gatekeeper

To have your work accepted,

and LieutenantsDictator

long live the King!

Lieutenants guardthe King

Blessed repository

Shared common

repository

we share “everything”

luckily no goats here

Centralised

atlassian.com/gitMore on Collaboration models

+ =CentralizedEnterprise

Centralized allows fine grained ACLs

Branch & Repo permissions

Integration with your

Issue tracking and CI

Which branching model?2

Product Releases1

Continuous Delivery2

Two common Branching Models

for Product Releases2.1

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-

Stable Branches4

Pull Requests5

master is alpha / RC6Before merges

Long running

Tim

e

mastestable branch

PRJ-

345-

bug-

desc

ript

ion

bugfix

2.2

2.2 for Continuous Delivery

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

Common Practices3

turbo boost!

What is a Pull Request?

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?

Single Repositoryvs

Remote Forks

Complete visibility1

No per Dev remotes required

KISS

2

3

Pros of a Single Repo

All feature branches available

Forks Are Great too BTW

Every one has their remote repository

With Forks

Full remote copy,each has one

Integrator, Gatekeeper,Tech Lead, etc.

Manage trust and maturity1

X department and 3rd parties

Dev to Dev interactions

2

3

Read “Cross”

Continuous Integration4

What happens to CI with git?1

An explosion of branches2

3 Performance degradation of build sys

Building everything is expensive1

Automatically build stable and master2

3 Manually trigger feature branch builds

Less Friction with5

Advantage:Integrated hooks

Advantage:Merge checks

Advantage:Fork syncing

In Conclusion: the recipe

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

atlassian.com/git

More on

Nicola PaolucciTHANK YOU FOR YOUR ATTENTION

@durdn

durdn.comShould I change

the pic?

Git Repository Management for

Enterprise Teams

Free Git Code Hosting for Small Teams

Free Git Desktop client for Mac or Windows

Atlassian

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