V e r s i o n C o n t r o l w i t h G i t a c - - PowerPoint PPT Presentation

v e r s i o n c o n t r o l w i t h g i t
SMART_READER_LITE
LIVE PREVIEW

V e r s i o n C o n t r o l w i t h G i t a c - - PowerPoint PPT Presentation

V e r s i o n C o n t r o l w i t h G i t a c c e l e r a t e d t u t o r i a l f o r b u s y a c a d e m i c s P i e r r e H a e s s i g C e n t r a l e S u p l e


slide-1
SLIDE 1
slide-2
SLIDE 2

2 / 2 6

V e r s i

  • n

C

  • n

t r

  • l

w i t h G i t

a c c e l e r a t e d t u t

  • r

i a l f

  • r

b u s y a c a d e m i c s

P i e r r e H a e s s i g C e n t r a l e S u p é l e c R e n n e s , J a n u a r y 2 4 , 2 1 8

slide-3
SLIDE 3

3 / 2 6

Wh y G i t ?

1 ) V e r s i

  • n

C

  • n

t r

  • l

s y s t e m : k e e p t r a c k

  • f

c h a n g e s ( h i s t

  • r

y )

  • G

i t = m

  • s

t p

  • p

u l a r V C S s i n c e 2 1

  • A

l t e r n a t i v e s : S u b v e r s i

  • n

( s v n ) , Me r c u r i a l

2 ) C

  • l

l a b

  • r

a t i

  • n
  • P

u b l i s h a n d

  • n

t h e w e b

  • i

n c l u d i n g t h e h i s t

  • r

y

  • a

l w a y s u p

  • t
  • d

a t e

  • C
  • l

l a b

  • r

a t e m a n a g e a s y n c h r

  • n
  • u

s c

  • n

t r i b u t i

  • n

s , w i t h p

  • t

e n t i a l c

  • n

f l i c t s .

slide-4
SLIDE 4

4 / 2 6

O u t l i n e

  • f

t h e t r a i n i n g

1 ) P e r s

  • n

a l w

  • r

k : s i n g l e u s e r

  • n

i t s l

  • c

a l c

  • m

p u t e r w e e k

  • l
  • n

g b r e a k 2 ) P u b l i s h w

  • r

k

  • n

t h e I n t e r n e t : h

  • s

t e d G i t s e r v i c e s ( G i t H u b , G i t L a b ) 3 ) C

  • l

l a b

  • r

a t i v e w

  • r

k : k e e p i n s y n c , m a n a g e c

  • n

f l i c t s

slide-5
SLIDE 5

5 / 2 6

1 ) P e r s

  • n

a l w

  • r

k

s i n g l e u s e r

  • n

i t s l

  • c

a l c

  • m

p u t e r ( n

  • l

e a k s

  • n

a “ c l

  • u

d ” ☻, b u t n

  • b

a c k u p e i t h e r ☹)

slide-6
SLIDE 6

6 / 2 6

P e r s

  • n

a l w

  • r

k ( l

  • c

a l c

  • m

p u t e r )

➔ S

e tu i n g u p G i t : i n s t a l l a n d c

  • n

f i g u r e (

  • n

c e p e r m a c h i n e )

➔ I

n i t i a l i z e a n e m p t y g i t r e p

  • s

i t

  • r

y ,

➔ T

r a c k c h a n g e s : a d d c h a n g e s t

  • t

h e s t a g i n g a r e a , c r e a t e c

  • m

m i t s

➔ C

  • m

p a r e v e r s i

  • n

s ( d i f ) a n d e x p l

  • r

e t h e h i s t

  • r

y ( l

  • g

)

P r a c t i c e 1

b a s e d

  • n

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e /

slide-7
SLIDE 7

7 / 2 6

S e tu i n g u p G i t

(

  • n

c e p e r m a c h i n e )

  • I

n s t a l l G i t . I n s t r u c t i

  • n

s f

  • r

Wi n d

  • w

s :

1 ) f i r s t , G i t f

  • r

Wi n d

  • w

s

h tu p : / / g i t f

  • r

w i n d

  • w

s .

  • r

g / .

O n p a g e

h tu p s : / / g i t

  • s

c m . c

  • m

/ d

  • w

n l

  • a

d / w i n

, d

  • w

n l

  • a

d s h

  • u

l d s t a r t a u t

  • m

a t i c a l l y . 2 ) t h e n I s u g g e s t T

  • r

t

  • i

s e G i t a s a c

  • n

v e n i e n t g r a p h i c a l t

  • l

h tu p s : / / t

  • r

t

  • i

s e g i t .

  • r

g /

  • C

r e a t e e m p t y f

  • l

d e r a n d

  • p

e n “ G i t B a s h ”

  • C
  • n

f i g u r e i d e n t i t y : g i t c

  • n

f i g ( n a m e & e m a i l )

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 2

  • s

e t u p /

P r a c t i c e 1

slide-8
SLIDE 8

8 / 2 6

C r e a t i n g a n ( e m p t y ) R e p

  • s

i t

  • r

y

  • g

i t i n i t

O b s e r v e n e w “ . g i t ” d i r e c t

  • r

y ( u n h i d e h i d d e n f i l e s a n d f

  • l

d e r s )

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 3

  • c

r e a t e /

P r a c t i c e 1

slide-9
SLIDE 9

9 / 2 6

T r a c k i n g c h a n g e s

A c t i

  • n

s : 1 ) P u t c h a n g e d f i l e s t

  • t

h e s t a g i n g a r e a : g i t a d d 2 ) S a v e s t a g e d c

  • n

t e n t a s a n e w c

  • m

m i t : g i t c

  • m

m i t C h e c k t h e S t a t u s

  • f

t h e r e p

  • s

i t

  • r

y : g i t s t a t u s

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 4

  • c

h a n g e s /

P r a c t i c e 1

slide-10
SLIDE 10

1 / 2 6

E x p l

  • r

i n g H i s t

  • r

y

  • C
  • m

p a r e v e r s i

  • n

s ( d i fg ) : g i t d i f f

– E

x : g i t d i f f H E A D ~ 1 s c r i p t . m

  • E

x p l

  • r

e t h e h i s t

  • r

y ( t h e g r a p h

  • f

a l l c

  • m

m i t s ) : g i t l

  • g

( E a s i e r w i t h g r a p h i c a l t

  • l

s , c . f . n e x t )

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 5

  • h

i s t

  • r

y /

P r a c t i c e 1

slide-11
SLIDE 11

1 1 / 2 6

P l a c e s c

  • n

f i g i n i t a d d c

  • m

m i t s t a t u s d i f f l

  • g

c h e c k

  • u

t C

  • m

m a n d s g i t . . . Wo r k s p a c e I n d e x / S t a g i n g a r e a L

  • c

a l R e p

  • s

i t

  • r

y

slide-12
SLIDE 12

1 2 / 2 6

G r a p h i c a l G i t t

  • l

s

  • (

T

  • )

m a n y t

  • c

h

  • s

e !

  • Wi

n d

  • w

s s h e l l : T

  • r

t

  • i

s e G i t

  • I

D E i n t e g r a t i

  • n

: e . g . Ma t l a b

slide-13
SLIDE 13

1 3 / 2 6

T

  • r

t

  • i

s e G i t

  • h

tu p s : / / t

  • r

t

  • i

s e g i t .

  • r

g /

  • A

“ Wi n d

  • w

s S h e l l I n t e r f a c e ” , i . e . , i n t h e f i l e e x p l

  • r

e r : “ r i g h t c l i c k ” → c

  • n

t e x t me n u

slide-14
SLIDE 14

1 4 / 2 6

G i t i n Ma t l a b

  • I

n t e g r a t i

  • n

i n t h e “ C u r r e n t F

  • l

d e r ” p a n e l

  • f

Ma t l a b D e s k t

  • p
  • D

e t a i l s i n d

  • c

h tu p s : / / f r . m a t h w

  • r

k s . c

  • m

/ h e l p / m a t l a b / s

  • u

r c e

  • c
  • n

t r

  • l

. h t m l

– e

. g . h a n d l i n g

  • f

b i n a r y f i l e s l i k e S i m u l i n k ’ s . s l x

slide-15
SLIDE 15

W e e k

  • l
  • n

g b r e a k

slide-16
SLIDE 16

1 6 / 2 6

2 ) P u b l i s h w

  • r

k

  • n

t h e I n t e r n e t

H

  • s

t e d G i t s e r v i c e s : G i t L a b ( a t C e n t r a l e S u p é l e c ) G i t H u b

slide-17
SLIDE 17

1 7 / 2 6

G i t L a b

G i t L a b i n s t a n c e h

  • s

t e d a t C S : h tu p s : / / g i t l a b . c e n t r a l e s u p e l e c . f r /

L

  • g

i n w i t h y

  • u

r u s u a l L D A P u s e r n a m e

slide-18
SLIDE 18

1 8 / 2 6

P u b l i s h w

  • r

k

B a s e d

  • n

t h e p r e v i

  • u

s l y c r e a t e d l

  • c

a l G i t r e p

  • s

i t

  • r

y ( P r a c t i c e 1 )

➔ O

n C e n t r a l e S u p é l e c G i t L a b w e b s i t e : c r e a t e a n e w r e p

  • s

i t

  • r

y .

➔ O

n l

  • c

a l c

  • m

p u t e r , a d d a r e m

  • t

e , t h e n p u s h t h e l

  • c

a l c

  • m

m i t s .

➔ O

n G i t L a b : e x p l

  • r

e t h e w e b i n t e r f a c e , l

  • k

a t t h e c

  • m

m i t s .

P r a c t i c e 2

b a s e d

  • n

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 7

  • g

i t h u b /

( w i t h G i t L a b i n s t e a d )

slide-19
SLIDE 19

1 9 / 2 6

3 ) C

  • l

l a b

  • r

a t i v e w

  • r

k

“ H

  • w

t

  • k

e e p i n s y n c ? ”

C l

  • n

e a n e x i s t i n g r e p

  • s

i t

  • r

y P u l l ( f e t c h & m e r g e ) f r e s h c h a n g e s Ma n a g e p

  • t

e n t i a l c

  • n

f l i c t s

slide-20
SLIDE 20

2 / 2 6

C

  • l

l a b

  • r

a t e

B a s e d

  • n

t h e p r e v i

  • u

s l y c r e a t e d

  • n

l i n e ( G i t L a b ) G i t r e p

  • s

i t

  • r

y ( P r a c t i c e 2 )

➔ m

a k e p a i r s : “ O w n e r ” a n d “ C

  • l

l a b

  • r

a t

  • r

➔ C

  • l

l a b . c l

  • n

e s t h e G L r e p

  • f

O w n e r ( n e e d s O t

  • g

i v e r i g h t s t

  • C

)

➔ C

  • l

l a b . m a k e s l

  • c

a l c h a n g e s , c

  • m

m i t a n d p u s h

➔ O

w n e r p u l l s t h

  • s

e c h a n g e s

P r a c t i c e 3

b a s e d

  • n

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 8

  • c
  • l

l a b /

slide-21
SLIDE 21

2 1 / 2 6

T h e “ p i n g

  • p
  • n

g ” G i t w

  • r

k f l

  • w

N

  • c
  • n

f l i c t s , i f p e

  • p

l e w

  • r

k i n v e r y d i f e r e n t t i m e z

  • n

e s ! N

  • t

i c e : G i t p r

  • v

i d e s n

  • l
  • c

k me c h a n i s m. Wo r k i s a s y n c h r

  • n
  • u

s

P r a c t i c e 3

g l

  • b

e w i t h m e r i d i a n s : h tu p s : / / w w w . e m

  • j

i

  • n

e . c

  • m

/ e m

  • j

i / 1 f 3 1

slide-22
SLIDE 22

2 2 / 2 6

Ma n a g e m e r g e c

  • n

f l i c t s

A g a i n i n p a i r s “ O w n e r ” a n d “ C

  • l

l a b

  • r

a t

  • r

➔ C

  • l

l a b c l

  • n

e s t h e G L r e p

  • f

O w n e r ( n e e d s O t

  • g

i v e r i g h t s t

  • C

)

➔ O

w n e r A N D C

  • l

l a b m a k e l

  • c

a l c h a n g e s , c

  • m

m i t

➔ B

  • t

h a tu e m p t t

  • p

u s h

➔ T

h e f i r s t t

  • p

u s h i s f i n e ☻

➔ T

h e s e c

  • n

d g e t s a n e r r

  • r

( “ l

  • c

a l i s b e h i n d r e m

  • t

e ” ) → n e e d s t

  • p

u l l s t h e f i r s t c h a n g e s , a n d m e r g e i t s

  • w

n c h a n g e s ( a u t

  • m

a t i c

  • r

n e e d s m a n u a l c

  • n

f l i c t r e s

  • l

u t i

  • n

)

➔ T

h e n s e c

  • n

d c r e a t e s a m e r g e c

  • m

m i t a n d f i n a l l y m a k e s a p u s h h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 9

  • c
  • n

f l i c t /

P r a c t i c e 3

slide-23
SLIDE 23

2 3 / 2 6

Me r g e c

  • m

m i t p r

  • c

e s s

1 ) E v e r y b

  • d

y s y n c e d 2 ) L

  • c

a l c

  • m

m i t s 3 ) C

  • l

l a b p u s h e s f i r s t → O w n e r ’ s v i e w

  • f

r e m

  • t

e i s

  • u

t d a t e d 4 ) O w n e r p u l l s a n d m a k e a m e r g e c

  • m

m i t 5 ) O w n e r p u s h e s C

  • l

l a b i s

  • u

t d a t e d 6 ) C

  • l

l a b p u l l s → e v e r y b

  • d

y s y n c e d

P r a c t i c e 3

h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e / 9

  • c
  • n

f l i c t / S e e a l s

  • G

i t B r a n c h i n g

  • B

r a n c h e s i n a N u t s h e l l f r

  • m

“ P r

  • G

i t ” b

  • k
slide-24
SLIDE 24

2 4 / 2 6

R e v i e w : t y p i c a l w

  • r

k f l

  • w

s

  • L
  • c

a l l y :

1 ) m a k e c h a n g e s 2 ) a d d t

  • s

t a g i n g 3 ) c

  • m

m i t t

  • l
  • c

a l r e p

  • Wi

t h a r e m

  • t

e :

1 ) p u l l f r

  • m

r e m

  • t

e ( b e f

  • r

e m a k i n g c h a n g e s i f p

  • s

s i b l e ) 2 ) m a k e l

  • c

a l c

  • m

m i t s 3 ) p u s h t

  • r

e m

  • t

e . I f e r r

  • r

( l

  • c

a l b e h i n d r e m

  • t

e ) , p u l l t

  • m

e r g e .

slide-25
SLIDE 25

2 5 / 2 6

R e s s

  • u

r c e s

G e n t l e i n t r

  • d

u c t i

  • n

:

V e r s i

  • n

C

  • n

t r

  • l

w i t h G i t ” l e s s

  • n

f r

  • m

S

  • fu

w a r e C a r p e n t r y h tu p : / / s w c a r p e n t r y . g i t h u b . i

  • /

g i t

  • n
  • v

i c e /

  • I

n t e r a c t i v e t u t

  • r

i a l h tu p s : / / t r y . g i t h u b . i

  • C
  • m

p r e h e n s i v e b

  • k

:

P r

  • G

i t ” b y C h a c

  • n

& S t r a u b , A p r e s s , 2 n d E d i t i

  • n

, 2 1 4 f r e e t

  • r

e a d

  • n

l i n e h tu p s : / / g i t

  • s

c m . c

  • m

/ b

  • k

/

slide-26
SLIDE 26

2 6 / 2 6

Qv i c k R e f e r e n c e s ( G i t “ C h e a t s h e e t s ” )

F r

  • m

S

  • fu

w a r e C a r p e n t r y ’ s l e s s

  • n

Qv i c k R e f e r e n c e p a g e :

  • P

r i n t a b l e P D F ( E N & F R )

h tu p s : / / s e r v i c e s . g i t h u b . c

  • m

/

  • n
  • d

e m a n d / r e s

  • u

r c e s / c h e a t s h e e t s /

  • I

n t e r a c t i v e w e b p a g e

h tu p : / / n d p s

  • fu

w a r e . c

  • m

/ g i t

  • c

h e a t s h e e t . h t m l