It            oan

@brampatelski

$git init

Getting started

$git clone user@host:/path

1

Super-easy to start

comitting

$git add <filename>
$git commit
$git push

2

No more splitted commits

staging

SVN

GIT

commit

commit

push

3

Offline commits

updating

$git pull

4

Update & merge

origin

pull

$svn update

Same as:

$git fetch
$git merge
$git clone https://github.com/First8/grails-trek.git

origin

commit

clone

push

5

On auth

No auth for (local) commits

$git init

commit

push

6

?

origin

$git remote add origin https://github.com/First8/grails-trek.git

On auth

Connecting remote later

Push vs. pull

origin

push

origin

pull

10

Controlled commit wo/ password-hassle

clone

clone

commit

commit

Pull requests

origin

pull

rev

dev

pull request

11

Peer review part of process

Github

13

Discussion logged (github)

14

Code explained

12

Code discussed (quality)

stashing

$git stash
$git stash list
$git stash apply
$git stash pop
$git stash drop

Stash (& remove)

List stash

Apply & remove top stash

Apply top stash

Remove top stash

7

Easy stashing work

branching

$git checkout -b feature_x

8

$git merge feature_x

Easy isolated work

master

F1

F2

$git checkout -b F1
$git checkout -b F2
$git pull
$git rebase master
$git checkout master
$git merge F2
$git add .
$git commit -m "merged F2 into master"
$git push

M += F2

F1 += (M + F2)

(M + F2) += F1

branching in detail

9

Advanced branching / merging

branching

$git checkout -b feature_x
$git checkout feature_x

Create and switch

Switch to branch

$git branch -d feature_x
$git branch

List branches

Delete branch

$git branch -D feature_x

Force delete branch

$git push origin feature_x

Push branch upstream

why master?

master

S1

test

acc

prod

S2

why master?

master

F1

test

acc

prod

Always based on prod

No release dependency

10

12

Feature releases

13

Isolated features to release

11

F2

recap

super easy to start

offline committing

easy update & merge

no authorization nightmare

easy stashing work

easy branching work

advanced branching & merging

peer reviews (pull request)

Github: code ->

- explained

- discussed

- discussion logged

Branching prod:

- isolated features

- no release dependency

- release features io. sprints

- always based on prod

Questions?

Resources:

The simple guide: http://rogerdudler.github.io/git-guide/

The detailed guide: http://git-scm.com/docs/gittutorial

The Atlassian guide: https://www.atlassian.com/git/tutorials/

The cheat sheet: https://training.github.com/kit/downloads/

                                          github-git-cheat-sheet.pdf

If all else fails:

@brampatelski

(Let me Google that for you)

Slides on: http://www.slides.com/brampatelski/

Made with Slides.com