Slide 1

Slide 1 text

the best way to build and ship software Collaboration patterns with Git & GitHub a @helaili - @AlainHelaili - ! [email protected]

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

the best way to build and ship software Git 3 " “//////////////////////////////////////////////////////////////// GIT - THE STUPID CONTENT TRACKER //////////////////////////////////////////////////////////////// "GIT" CAN MEAN ANYTHING, DEPENDING ON YOUR MOOD. - RANDOM THREE-LETTER COMBINATION THAT IS PRONOUNCEABLE, AND NOT ACTUALLY USED BY ANY COMMON UNIX COMMAND. THE FACT THAT IT IS A MISPRONUNCIATION OF "GET" MAY OR MAY NOT BE RELEVANT. - STUPID. CONTEMPTIBLE AND DESPICABLE. SIMPLE. TAKE YOUR PICK FROM THE DICTIONARY OF SLANG. - "GLOBAL INFORMATION TRACKER": YOU'RE IN A GOOD MOOD, AND IT ACTUALLY WORKS FOR YOU. ANGELS SING, AND A LIGHT SUDDENLY FILLS THE ROOM. - "GODDAMN IDIOTIC TRUCKLOAD OF SH*T": WHEN IT BREAKS

Slide 4

Slide 4 text

the best way to build and ship software Git 4 " • Started by Linus Torvalds 2005 (search “torvalds git” on youtube) • Easy branching and merging - content oriented, remembers origin • Small and fast - local operations, smaller repos • Distributed - VCS on my laptop, full copy incl. history • Data assurance - sha1, gpg • Staging area - crafted, meaningful commits • Free and open source - did you read the first line of this slide?

Slide 5

Slide 5 text

the best way to build and ship software Git lingo 5 " # Repo % Clone & Pull ' Push ( Commit ) Diff * Branch + Merge ,-./ Rebase Disclaimer The views and opinions expressed here are those of the authors and do not necessarily reflect the official policy or position of GitHub or anybody else on the planet, including actually myself. You might be able to find somewhere someone who agrees with this statement, and this person would actually be the right one to start debating on this topic. I personally do not want to discuss this matter as we will never find a common ground. 0

Slide 6

Slide 6 text

the best way to build and ship software Git Quick Demo 6 "

Slide 7

Slide 7 text

the best way to build and ship software An ideal patch flow 7 " “(0) YOU COME UP WITH AN ITCH. YOU CODE IT UP. (1) SEND IT TO THE LIST AND CC PEOPLE WHO MAY NEED TO KNOW ABOUT THE CHANGE. (2) YOU GET COMMENTS AND SUGGESTIONS FOR IMPROVEMENTS. YOU MAY EVEN GET THEM IN A "ON TOP OF YOUR CHANGE" PATCH FORM. (3) POLISH, REFINE, AND RE-SEND TO THE LIST AND THE PEOPLE WHO SPEND THEIR TIME TO IMPROVE YOUR PATCH. GO BACK TO STEP (2). (4) THE LIST FORMS CONSENSUS THAT THE LAST ROUND OF YOUR PATCH IS GOOD. SEND IT TO THE MAINTAINER AND CC THE LIST. (5) A TOPIC BRANCH IS CREATED WITH THE PATCH AND IS MERGED TO ‘NEXT', AND COOKED FURTHER AND EVENTUALLY GRADUATES TO ‘MASTER'. - HTTPS://GITHUB.COM/GIT/GIT/BLOB/MASTER/DOCUMENTATION/SUBMITTINGPATCHES

Slide 8

Slide 8 text

" http://www.wired.com/2012/02/github-2/ Photo : Ariel Zambelich/Wired

Slide 9

Slide 9 text

" Social Coding

Slide 10

Slide 10 text

the best way to build and ship software GitHub key facts 10 " FOUNDED 2008 EMPLOYEES 345 UNIVERSITIES USING GITHUB 1,000+ TOTAL 
 REGISTERED USERS 10M TOTAL REPOSITORIES 27M PAYING ORGANIZATIONS >60,000

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

" Orgs, Teams, Collaborators…

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

" GitHub Flow

Slide 18

Slide 18 text

Create a Feature Branch

Slide 19

Slide 19 text

Add commits

Slide 20

Slide 20 text

Open a Pull Request

Slide 21

Slide 21 text

Discuss and Review Code

Slide 22

Slide 22 text

Deploy and Test

Slide 23

Slide 23 text

Merge with master

Slide 24

Slide 24 text

" Fork & Pull Flow

Slide 25

Slide 25 text

# 1 * 2 3 3 + & * 4 5 3 3 Upstream Origin Fork

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

# 1 * 2 3 3 + & * 4 5 3 3 Upstream Origin Create a Feature Branch

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

# 1 * 2 3 3 + & * 4 5 3 3 Upstream Origin Add commits

Slide 30

Slide 30 text

# 1 * 2 3 3 + & * 4 5 3 3 Upstream Origin Open a Pull Request

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

# 1 * 2 3 3 + & * 4 5 3 3 Upstream Origin Discuss and Review Code

Slide 33

Slide 33 text

# 1 * 2 3 3 & * 4 5 3 3 Upstream Origin Merge +

Slide 34

Slide 34 text

# 1 * 2 3 3 + & * 4 5 3 3 Upstream Origin Pull from Upstream Master

Slide 35

Slide 35 text

" Dictator & Lieutenant Flow

Slide 36

Slide 36 text

# 4 1 5 1 5 5 4 4 1 1 1 1 1 Dictator Lieutenants Public contributors

Slide 37

Slide 37 text

# 4 1 5 1 5 5 4 4 1 1 1 1 1 Dictator Lieutenants Public contributors 2 2 2 2 2 2 +

Slide 38

Slide 38 text

# 4 1 5 1 5 5 4 4 1 1 1 1 1 Dictator Lieutenants Public contributors

Slide 39

Slide 39 text

" Secret Flow

Slide 40

Slide 40 text

# # 1 1 6 6 4 4 # 1 1 5 5 2 2 2 2 git init toplevel … git submodule add https://octodemo.com/helaili/submodule2.git git commit -a -m "Adding submodules” git push origin master 7 7 7

Slide 41

Slide 41 text

" Git Flow

Slide 42

Slide 42 text

http://nvie.com/posts/a-successful-git-branching-model/

Slide 43

Slide 43 text

" Code Review

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

1, 2… Some…. All?

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

What’s new?

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

" " hubot

Slide 52

Slide 52 text

" Questions?