code collaboration with git & stash (and bamboo)

78
Code Collaboration with Git + Stash + Bamb

Post on 21-Oct-2014

2.474 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Code Collaboration With Git & Stash (and Bamboo)

Code Collaborationwith

Git + Stash + Bamb!

Page 2: Code Collaboration With Git & Stash (and Bamboo)

Sven Peters

@svenpethttp://svenpet.com

Happy Ambassador

Page 3: Code Collaboration With Git & Stash (and Bamboo)

Lonesome Cowboy

Page 4: Code Collaboration With Git & Stash (and Bamboo)

The trouble startswith the team

Page 5: Code Collaboration With Git & Stash (and Bamboo)

It's not your code

It's your teams code

Page 6: Code Collaboration With Git & Stash (and Bamboo)

C

DE

T GETHERget help

Page 7: Code Collaboration With Git & Stash (and Bamboo)

Bringing code together

Sharing code with others

Protecting your code

C

DE

T GETHER

Your coding workflow!

Page 8: Code Collaboration With Git & Stash (and Bamboo)

Bringing code together

C

DE

T GETHER

Page 9: Code Collaboration With Git & Stash (and Bamboo)

Branching is cool!

Page 10: Code Collaboration With Git & Stash (and Bamboo)

Are you

crazy?

Page 11: Code Collaboration With Git & Stash (and Bamboo)

MERGE

HELL

Page 12: Code Collaboration With Git & Stash (and Bamboo)

Branching is cool!

Page 13: Code Collaboration With Git & Stash (and Bamboo)

DVCS rocks

GitMercurial

Page 14: Code Collaboration With Git & Stash (and Bamboo)

A branch for every issue

Page 15: Code Collaboration With Git & Stash (and Bamboo)

Branches have short lives

~ 2 days

Page 16: Code Collaboration With Git & Stash (and Bamboo)

What about Continuous Integration ?

Page 17: Code Collaboration With Git & Stash (and Bamboo)

Builds set up for the main branch

Page 18: Code Collaboration With Git & Stash (and Bamboo)

plan branches

Page 19: Code Collaboration With Git & Stash (and Bamboo)

This is not Continuous Integration

Page 20: Code Collaboration With Git & Stash (and Bamboo)

Auto merge branches

master

change

feature branch

push changes

Option #1

Page 21: Code Collaboration With Git & Stash (and Bamboo)

Auto merge branches

feature branch

change

master

push changes

Option #2

Page 22: Code Collaboration With Git & Stash (and Bamboo)

Alright, maybe it is :(

Page 23: Code Collaboration With Git & Stash (and Bamboo)

Bamboo

Page 24: Code Collaboration With Git & Stash (and Bamboo)

C

DE

T GETHER

Sharing code with others

Page 25: Code Collaboration With Git & Stash (and Bamboo)

I've written that code. It's faster

when I just fix it.

Do you have such a team member?

I can't tell you how this works.

It's too complicated.

This is a very sensitive area... You can easily

break things

Page 26: Code Collaboration With Git & Stash (and Bamboo)

I want to protectmy job!

Do you have such a team member?

Page 27: Code Collaboration With Git & Stash (and Bamboo)

Do you have such a team member?

Firehim!

Page 28: Code Collaboration With Git & Stash (and Bamboo)

learn

better quality

feel better

blame

Why do you want to discuss your code changes?

Page 29: Code Collaboration With Git & Stash (and Bamboo)

Discuss your code changes

they get merged!before

use Pu$ Requests

Page 30: Code Collaboration With Git & Stash (and Bamboo)

use Pu$ Requests

what do you think?

create

Page 31: Code Collaboration With Git & Stash (and Bamboo)

use Pu$ Requests

what do you think?

invite

Page 32: Code Collaboration With Git & Stash (and Bamboo)

use Pu$ Requests

what do you think?

discuss & approve

Page 33: Code Collaboration With Git & Stash (and Bamboo)

use Pu$ Requests

what do you think?

merge

Page 34: Code Collaboration With Git & Stash (and Bamboo)

use Pu$ Requests

I know @Ben has already written an algorithm for that

involve

Page 35: Code Collaboration With Git & Stash (and Bamboo)

Dem Time

Page 36: Code Collaboration With Git & Stash (and Bamboo)
Page 37: Code Collaboration With Git & Stash (and Bamboo)

on Codeis great !

Share and Collaborate

Page 38: Code Collaboration With Git & Stash (and Bamboo)

on Codeshould be easy and fast

Share and Collaborate

Page 39: Code Collaboration With Git & Stash (and Bamboo)

Simple Workflow

Pull Request

Branch

Merge

Page 40: Code Collaboration With Git & Stash (and Bamboo)

Simple Workflow

Pull Request

Branch

Merge

No Roles

Page 41: Code Collaboration With Git & Stash (and Bamboo)

C

DE

T GETHER

Protecting your code

Page 42: Code Collaboration With Git & Stash (and Bamboo)

C

DE

T GETHER

Make sure....

Page 43: Code Collaboration With Git & Stash (and Bamboo)

Pull Request

Branch

Merge

No RolesSimple Workflow

Page 44: Code Collaboration With Git & Stash (and Bamboo)

Pull Request

Branch

Merge

No RolesSimple Workflow

Page 45: Code Collaboration With Git & Stash (and Bamboo)

Pull Request

Branch

Merge

Some RolesSimple Workflow

Page 46: Code Collaboration With Git & Stash (and Bamboo)

Branch Permissions

Page 47: Code Collaboration With Git & Stash (and Bamboo)

Making surethat the right people can merge codeinto the right branches

#1

Page 48: Code Collaboration With Git & Stash (and Bamboo)

Pull Request

Merge

minimum two a'rovals

Review Rules

Page 49: Code Collaboration With Git & Stash (and Bamboo)

Pull Request

Merge

Review Rules

Page 50: Code Collaboration With Git & Stash (and Bamboo)

Making surethat the somebody reviewed the code

#2

Page 51: Code Collaboration With Git & Stash (and Bamboo)

Pull Request

Merge

Build Rules

Page 52: Code Collaboration With Git & Stash (and Bamboo)

Pull Request

Merge

Build Rules

Page 53: Code Collaboration With Git & Stash (and Bamboo)

Making surethat the build stays green after a merge

#3

Page 54: Code Collaboration With Git & Stash (and Bamboo)

Project Permissions

ProjectWonderland Project

Fairytale

Page 55: Code Collaboration With Git & Stash (and Bamboo)

Making surethat the right people have access

#4

to the code they need

Page 56: Code Collaboration With Git & Stash (and Bamboo)

Security DevSpeed

Page 57: Code Collaboration With Git & Stash (and Bamboo)

The Repo GuardBeware

Page 58: Code Collaboration With Git & Stash (and Bamboo)

Can I get a new Repository?

Please!

Page 59: Code Collaboration With Git & Stash (and Bamboo)

Can I get a new Repository?

I'll do in 3 days

Page 60: Code Collaboration With Git & Stash (and Bamboo)

Create Repository

Page 61: Code Collaboration With Git & Stash (and Bamboo)

Making surethat the development team can move fast

#5

Page 62: Code Collaboration With Git & Stash (and Bamboo)

Your coding workflow!

Page 63: Code Collaboration With Git & Stash (and Bamboo)

Teams are different

so are their workflows

Page 64: Code Collaboration With Git & Stash (and Bamboo)

Feature BranchWorkflow

Page 65: Code Collaboration With Git & Stash (and Bamboo)

ForkWorkflow

Page 66: Code Collaboration With Git & Stash (and Bamboo)

ForkWhat is a ?

Makes a copy of a repository on the server

No direct pushing to the original remote repository

Synch changes from the original remote repository

automatic synch can be activated in Stash

Page 67: Code Collaboration With Git & Stash (and Bamboo)

ForkWhy a in the enterprise?

tweaking libraries

innovation spikes

protecting components

reduce noise

interaction with contractors

instead of branch permi(ions

Page 68: Code Collaboration With Git & Stash (and Bamboo)

Some people need more

Page 69: Code Collaboration With Git & Stash (and Bamboo)

Features1.

Page 70: Code Collaboration With Git & Stash (and Bamboo)

Features2

Page 71: Code Collaboration With Git & Stash (and Bamboo)

Feature 1:

Stash Add-ons

Page 72: Code Collaboration With Git & Stash (and Bamboo)

Feature 2:

Page 73: Code Collaboration With Git & Stash (and Bamboo)

Write a hook!

Protect unmerged branch hook

you must merge before you delete a branch

Page 74: Code Collaboration With Git & Stash (and Bamboo)

Write a hook!

Unaprove Reviewer hook

new code in a pu$ request must be reviewed!

Page 75: Code Collaboration With Git & Stash (and Bamboo)

Write a hook!

Branch from green build hook

never branch from a red build

Page 76: Code Collaboration With Git & Stash (and Bamboo)

HooksAdd-Ons

or download one

Page 77: Code Collaboration With Git & Stash (and Bamboo)

see code

see issue details

see build status

Page 78: Code Collaboration With Git & Stash (and Bamboo)

Code On!

svenpet.com/slides

@svenpethttp://svenpet.com