+ All Categories
Home > Documents > Enterprise git

Enterprise git

Date post: 11-Jul-2015
Category:
Upload: pedro-melo
View: 1,298 times
Download: 3 times
Share this document with a friend
Popular Tags:
79
Enterprise Git Pedro Melo <{xmpp,mailto}:[email protected] >
Transcript
Page 1: Enterprise git

Enterprise GitPedro Melo

<{xmpp,mailto}:[email protected]>

Page 2: Enterprise git

About Git...

Page 3: Enterprise git

About Git...

an unpleasant or contemptible person

Page 4: Enterprise git

Why Git?

Page 5: Enterprise git

Why Git?• Fast, secure, safe, solid

Page 6: Enterprise git

Why Git?• Fast, secure, safe, solid

• Great collaboration tools: built-in and from third parties

Page 7: Enterprise git

Why Git?• Fast, secure, safe, solid

• Great collaboration tools: built-in and from third parties

• Distributed (think offline mode, freedom to tinker)

Page 8: Enterprise git

Why Git?• Fast, secure, safe, solid

• Great collaboration tools: built-in and from third parties

• Distributed (think offline mode, freedom to tinker)

• Cross-platform: UNIX, Mac OS X, Windows

Page 9: Enterprise git

Why Git?• Fast, secure, safe, solid

• Great collaboration tools: built-in and from third parties

• Distributed (think offline mode, freedom to tinker)

• Cross-platform: UNIX, Mac OS X, Windows

• Proven track record: Linux Kernel, KDE, X.org, KDE, Gnome, Android, Debian, Fedora, openSUSE, Mono, Perl, Ruby, Samba, PostgreSQL, Wine, and many others

Page 10: Enterprise git

Adoption challenges

Page 11: Enterprise git

Adoption challenges

The devil you know....

Page 12: Enterprise git

Adoption challenges

Page 13: Enterprise git

Adoption challenges

Centralized vs Distributed

Page 14: Enterprise git

Adoption challenges

Page 15: Enterprise git

Adoption challenges

Liberal branching

Page 16: Enterprise git

Tools

Page 17: Enterprise git

Git “Server”

Page 18: Enterprise git

Git “Server”• “Server” is what you want it to be: an SSH

account, a simple HTTP server, or a CGI-capable HTTP server

Page 19: Enterprise git

Git “Server”• “Server” is what you want it to be: an SSH

account, a simple HTTP server, or a CGI-capable HTTP server

• No centralized server built-in concept

Page 20: Enterprise git

Git “Server”• “Server” is what you want it to be: an SSH

account, a simple HTTP server, or a CGI-capable HTTP server

• No centralized server built-in concept

• One or more repositories in well-known locations become the central repository

Page 21: Enterprise git

Git “Server”• “Server” is what you want it to be: an SSH

account, a simple HTTP server, or a CGI-capable HTTP server

• No centralized server built-in concept

• One or more repositories in well-known locations become the central repository

• Social convention wins

Page 22: Enterprise git

Centralized Git Servers

Page 23: Enterprise git

Centralized Git ServersGitosis Gitolite

Managed by git Managed by git + shell

Maintained? Active development

repo x user repo x user x branch x

action

Page 24: Enterprise git

Centralized Git ServersGitosis Gitolite

Managed by git Managed by git + shell

Maintained? Active development

repo x user repo x user x branch x

action

Page 25: Enterprise git

Centralized Git ServersGitosis Gitolite

Managed by git Managed by git + shell

Maintained? Active development

repo x user repo x user x branch x

action

Page 26: Enterprise git

Centralized Git ServersGitosis Gitolite

Managed by git Managed by git + shell

Maintained? Active development

repo x user repo x user x branch x

action

Page 27: Enterprise git

Git + Project Mgmt

Page 28: Enterprise git

Git + Project Mgmt

• OSS

• Redmine

• Trac

• Hosted

• Github (also has in-house solution)

• CodeBaseHQ

Page 29: Enterprise git

Git + Project Mgmt

• OSS

• Redmine

• Trac

• Hosted

• Github (also has in-house solution)

• CodeBaseHQ

Page 30: Enterprise git

Git + Project Mgmt

• OSS

• Redmine

• Trac

• Hosted

• Github (also has in-house solution)

• CodeBaseHQ

Page 31: Enterprise git

One final tool...

Page 32: Enterprise git

One final tool...

• Hudson

Page 33: Enterprise git

One final tool...

• Hudson

• Continuous integration solution

Page 34: Enterprise git

One final tool...

• Hudson

• Continuous integration solution

• Integrates very well with Git

Page 35: Enterprise git

One final tool...

• Hudson

• Continuous integration solution

• Integrates very well with Git

• Its *very* easy to install

Page 36: Enterprise git

One final tool...

• Hudson

• Continuous integration solution

• Integrates very well with Git

• Its *very* easy to install

• ... and it has Chuck Norris quotes!

Page 37: Enterprise git

Team organization

Page 38: Enterprise git

Linux Kernel

General

Lieutenant A

Lieutenant B

Lieutenant C

Official

Army

Page 39: Enterprise git

Common organization

Developers

Smoker Collaboration Production

Page 40: Enterprise git

Lets talk about merging...

Page 41: Enterprise git

Merge

master

Page 42: Enterprise git

Merge

master

feature

git checkout -b feature

Page 43: Enterprise git

Merge

feature

master

Page 44: Enterprise git

Merge

feature

master

git checkout master; git merge feature

Page 45: Enterprise git

Merge

feature

master

git checkout master; git reset --hard master^git checkout master; git reset --hard HEAD^

Page 46: Enterprise git

Merge

master

feature

git checkout feature; git merge master

Page 47: Enterprise git

Merge

feature

master

git checkout master; git merge feature

Page 48: Enterprise git

Merge

master

feature

Page 49: Enterprise git

Rebasefeature

master

Page 50: Enterprise git

Rebasefeature

master

A B C

X Y Z

Page 51: Enterprise git

Rebase

master

A B C

X Y Z

X' Y' Z'

feature

git checkout feature; git rebase master

Page 52: Enterprise git

Rebase

master

A B C

X Y Z

X' Y' Z'

feature

dAX

dXY dYZ

dAX'

dXY' dYZ'

Page 53: Enterprise git

Rebase

master

A B C

X Y Z

X' Y' Z'

feature

Page 54: Enterprise git

Rebase

A B C

X Y Z

X' Y' Z'

feature

master

git checkout master; git merge feature

Page 55: Enterprise git

Rebase

master

A B C

X Y Z

X' Y' Z'

feature

Page 56: Enterprise git

Rebase

A B C

X Y Z

X' Y' Z'

feature

D

master

git checkout master; git merge --no-ff feature

Page 57: Enterprise git

Branch naming

Page 58: Enterprise git

git branches

• Byte strings, so mixing codepages bad idea

• Use directories to organize branches

• feature/*, test/*, <dev_handle>/*

• Think globally to minimize clashes

Page 59: Enterprise git

Project phases

Page 60: Enterprise git

Project phases

• Production

Page 61: Enterprise git

Project phases

• Production

• Releases

Page 62: Enterprise git

Project phases

• Production

• Releases

• Staging

Page 63: Enterprise git

Project phases

• Production

• Releases

• Staging

• Features

Page 64: Enterprise git

Project phases

• Production

• Releases

• Staging

• Features

• Celsadas HotFixes

Page 65: Enterprise git

Common branch names

Page 66: Enterprise git

Common branch names

• Everybody has a production branch: master

Page 67: Enterprise git

Common branch names

• Everybody has a production branch: master

• Release branches: release/*

Page 68: Enterprise git

Common branch names

• Everybody has a production branch: master

• Release branches: release/*

• New features get a branch each: feature/*

Page 69: Enterprise git

Common branch names

• Everybody has a production branch: master

• Release branches: release/*

• New features get a branch each: feature/*

• If you have multiple developers on the same feature: feature/NAME/DEV

Page 70: Enterprise git

Common branch names

• Everybody has a production branch: master

• Release branches: release/*

• New features get a branch each: feature/*

• If you have multiple developers on the same feature: feature/NAME/DEV

• If you need a “next production”: develop

Page 71: Enterprise git

Common branch names

• Everybody has a production branch: master

• Release branches: release/*

• New features get a branch each: feature/*

• If you have multiple developers on the same feature: feature/NAME/DEV

• If you need a “next production”: develop

• When things go wrong: hotfix/*

Page 72: Enterprise git

Conclusions

Page 73: Enterprise git

Conclusions

• Git is ready for big teams

Page 74: Enterprise git

Conclusions

• Git is ready for big teams

• Git is also ready for small teams

Page 75: Enterprise git

Conclusions

• Git is ready for big teams

• Git is also ready for small teams

• There is no right way...

Page 76: Enterprise git

Conclusions

• Git is ready for big teams

• Git is also ready for small teams

• There is no right way...

• ... but start with current best practices

Page 77: Enterprise git

Conclusions

• Git is ready for big teams

• Git is also ready for small teams

• There is no right way...

• ... but start with current best practices

• Whatever you do, the important thing is to use a source control system

Page 78: Enterprise git

Obrigado!

Page 79: Enterprise git

Pedro [email protected]

@pedromelo

Questions about Git, Perl, XMPP, just find me and ask away

I’ll be here the three days


Recommended