V e r s i o n C o n t r o l w i t h G i t B e - - 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 B e - - PowerPoint PPT Presentation

V e r s i o n C o n t r o l w i t h G i t B e f o r e w e s t a r t S i g n u p a t g i t h u b . c o m P a r t n e r u p w i t h t h e p e r s o n n e x t t


slide-1
SLIDE 1

V e r s i

  • n

C

  • n

t r

  • l

w i t h G i t

  • B

e f

  • r

e w e s t a r t

  • S

i g n u p a t g i t h u b . c

  • m
  • P

a r t n e r u p w i t h t h e p e r s

  • n

n e x t t

  • y
  • u

1

slide-2
SLIDE 2

W h a t i s V e r s i

  • n

C

  • n

t r

  • l

?

( A K A r e v i s i

  • n

c

  • n

t r

  • l

, s

  • u

r c e c

  • n

t r

  • l

)

  • T

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

  • f

i l e s

  • A

n y f i l e c a n b e t r a c k e d

  • T

e x t ( . t x t , . c s v , . p y , . c , . r e t c . ) w

  • r

k s b e s t

  • T

h e s e a l l

  • w

s m a r t d i f / m e r g e e t c .

2

slide-3
SLIDE 3

W h y U s e V e r s i

  • n

C

  • n

t r

  • l

? # 1

3

  • A

m

  • r

e e fg i c i e n t b a c k u p

  • R

e p r

  • d

u c i b i l i t y

slide-4
SLIDE 4

W h y U s e V e r s i

  • n

C

  • n

t r

  • l

? # 2

4

  • T

e a m w

  • r

k

slide-5
SLIDE 5

V e r s i

  • n

C

  • n

t r

  • l

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

  • C

h a n g e s a r e t r a c k e d s e q u e n t i a l l y

5

slide-6
SLIDE 6

V e r s i

  • n

C

  • n

t r

  • l

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

  • D

i fg e r e n t v e r s i

  • n

s c a n b e s a v e d

6

slide-7
SLIDE 7

V e r s i

  • n

C

  • n

t r

  • l

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

  • M

u l t i p l e v e r s i

  • n

s c a n b e m e r g e d

7

slide-8
SLIDE 8

V e r s i

  • n

C

  • n

t r

  • l

A l t e r n a t i v e s

  • S

u b v e r s i

  • n

( s v n )

  • C

e n t r a l i s e d

  • M

e r c u r i a l ( h g )

  • D

i s t r i b u t e d

  • G

i t ( g i t ) – D i s t r i b u t e d

  • N

. B . G i t H u b ! = g i t

8

slide-9
SLIDE 9

L

  • c

a l C

  • n

f i g u r a t i

  • n
  • g

i t c

  • n

f i g

11

slide-10
SLIDE 10

C r e a t i n g a R e p

  • s

i t

  • r

y

  • g

i t i n i t

  • g

i t s t a t u s

12

slide-11
SLIDE 11

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

  • F

i l e s

  • g

i t a d d

  • g

i t c

  • m

m i t

13

slide-12
SLIDE 12

G i t – a d d a n d c

  • mmi

t

17 Workspace Staging Area Local Repo Visible File System Git Repository add commit

slide-13
SLIDE 13

E x p l

  • r

i n g H i s t

  • r

y # 1

  • g

i t l

  • g
  • g

i t d i fg

15

slide-14
SLIDE 14

G i t – d i fg # 1

17 Workspace Staging Area Local Repo Visible File System Git Repository diff diff --staged

slide-15
SLIDE 15

G i t – d i fg # 2

17 Workspace Staging Area Local Repo Visible File System Git Repository diff HEAD

sl33v51a f22b25e g31a45d

HEAD HEAD ~1 HEAD ~2 diff sl33v51a

slide-16
SLIDE 16

R e s t

  • r

i n g F i l e s

  • g

i t c h e c k

  • u

t

15

slide-17
SLIDE 17

G i t

  • r

e s t

  • r

a t i

  • n

17 Workspace Staging Area Local Repo Visible File System Git Repository

sl33v51a f22b25e g31a45d

checkout f22b25e

f22b25e

HEAD HEAD ~1 HEAD ~2 checkout HEAD

g31a45d

slide-18
SLIDE 18

G i t W

  • r

k f l

  • w

– L

  • c

a l R e p

  • .

17

slide-19
SLIDE 19

C

  • l

l a b

  • r

a t i

  • n

17

Sarah's computer /home/sarah/planets Fred's computer /home/fred/planets

A B

slide-20
SLIDE 20

C

  • l

l a b

  • r

a t i

  • n
  • L

e t ' s c

  • l

l a b

  • r

a t e v i a r e m

  • t

e r e p

  • W
  • r

k i n g i n p a i r s :

  • D

e v e l

  • p

e r A / D e v e l

  • p

e r B

18

slide-21
SLIDE 21

C

  • l

l a b

  • r

a t i

  • n

: R e mo t e R e p

  • s

i t

  • r

i e s # 1

  • D

e v e l

  • p

e r A

– S

i g n i n h t t p s : / / g i t h u b . c

  • m

/

C r e a t e r e p

  • s

i t

  • r

y

g i t r e m

  • t

e a d d

g i t p u s h

– A

d d D e v e l

  • p

e r B a s a c

  • l

l a b

  • r

a t

  • r
slide-22
SLIDE 22

C

  • l

l a b

  • r

a t i

  • n

: R e mo t e R e p

  • s

i t

  • r

i e s # 2

  • D

e v e l

  • p

e r B

C l e a n u p

g i t c l

  • n

e

g i t a d d

g i t c

  • m

m i t

g i t p u s h

slide-23
SLIDE 23

C

  • l

l a b

  • r

a t i

  • n

: R e mo t e R e p

  • s

i t

  • r

i e s # 3

  • D

e v e l

  • p

e r A

g i t p u l l

slide-24
SLIDE 24

C

  • l

l a b

  • r

a t i

  • n

: R e mo t e R e p

  • s

i t

  • r

i e s # 4

  • E

x e r c i s e

– D

e v e l

  • p

e r A – A d d R E A D M E . m d , ( a u t h

  • r

s a n d i n f

  • )

.

– D

e v e l

  • p

e r B – s y n c u p y

  • u

r r e p

  • s

i t

  • r

y

slide-25
SLIDE 25

C

  • l

l a b

  • r

a t i

  • n

: C

  • n

f l i c t s # 1

mm = inches * 25.4 return mm

mm = inches * 25.4 return mm # TODO(Sarah): Add fu

slide-26
SLIDE 26

C

  • l

l a b

  • r

a t i

  • n

: C

  • n

f l i c t s # 2

mm = inches * 25.4 return mm

mm = inches * 25.4 return mm # TODO(Sarah): Add fu

?

mm = inches * 25.4 return mm # TODO(Fred): Add fu

slide-27
SLIDE 27

G i t W

  • r

k f l

  • w

– R e mo t e R e p

  • .

21

slide-28
SLIDE 28

W h a t n e x t ?

  • B

r a n c h i n g / M e r g i n g

  • h

t t p s : / / s

  • fu

w a r e

  • c

a r p e n t r y .

  • r

g

22