Slide 1

Slide 1 text

Introduction to Git Łukasz Wróbel

Slide 2

Slide 2 text

About me ● Architect, team leader; ● high-traffic websites: ○ nk.pl; ○ Gadu-Gadu. ● “Memoirs of a Software Team Leader”; ● @lukaszwrobel

Slide 3

Slide 3 text

Team collaboration

Slide 4

Slide 4 text

How to introduce changes?

Slide 5

Slide 5 text

A designated computer? A server? USB flash drive?

Slide 6

Slide 6 text

Version control Git

Slide 7

Slide 7 text

Repository Common version. Conflict detection.

Slide 8

Slide 8 text

A plethora of possibilities Branches - isolation. Master is the default one.

Slide 9

Slide 9 text

Feature branches “Make this button more shiny”. Features being merged with master.

Slide 10

Slide 10 text

8 steps to collaboration

Slide 11

Slide 11 text

1. Cloning the repository » git clone URL

Slide 12

Slide 12 text

2. Working on files » vim README.md

Slide 13

Slide 13 text

3. What’s the situation? » git status

Slide 14

Slide 14 text

3. What’s the situation? » git status # On branch master # Changes not staged for commit: # (use "git add ..." to update what # will be committed) # (use "git checkout -- ..." to # discard changes in working directory) # # modified: README.md # no changes added to commit (use "git add" and/or "git commit -a")

Slide 15

Slide 15 text

4. What exactly have I done? » git diff +Some important info belongs here. +

Slide 16

Slide 16 text

5. I want to share these changes. » git add README.md

Slide 17

Slide 17 text

6. Double-checking » git diff --cached +Some important info belongs here. +

Slide 18

Slide 18 text

7. Making a commit » git commit -m 'README extended with some vital information'

Slide 19

Slide 19 text

7. Making a commit » git commit -m 'README extended with some vital information' [master 2964374] README extended with some vital information 1 file changed, 2 insertions(+)

Slide 20

Slide 20 text

8. Sharing your changes » git push origin master

Slide 21

Slide 21 text

How to update your copy? You’re not alone after all.

Slide 22

Slide 22 text

» git pull origin master

Slide 23

Slide 23 text

It’s just the beginning.

Slide 24

Slide 24 text

Thank you! @lukaszwrobel