Slide 1

Slide 1 text

A (brief) introduction to git (in 40 minutes) By Tomáš Jukin @Inza 1 GUG.cz @GUGcz GUG CVUT @cvutGUG Google Global Dart Hackathon Prague 2012 @GUGhackathon #darthack12

Slide 2

Slide 2 text

2 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git “A long story short...” Today

Slide 3

Slide 3 text

3 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git “...about a SCM tool...” Today

Slide 4

Slide 4 text

4 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git “...about a SCM tool...” Today Source Code Management

Slide 5

Slide 5 text

5 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git • We NEED to share code! • FTP sucks • Mail sucks • CVS is a history • SVN is limited Why?

Slide 6

Slide 6 text

6 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git “What shall we do?” Why?

Slide 7

Slide 7 text

7 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 8

Slide 8 text

8 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git • Distributed SCM • By geeks around Linux Kernel • The most powerful SCM out there

Slide 9

Slide 9 text

9 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git • Secure • Distributed • Powerful

Slide 10

Slide 10 text

10 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git • http://git-scm.com/ • http://book.git-scm.com/ • http://progit.org/book/

Slide 11

Slide 11 text

Workflow 11 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 12

Slide 12 text

Workflow 12 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy

Slide 13

Slide 13 text

Workflow 13 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy

Slide 14

Slide 14 text

Workflow 14 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Local Repo

Slide 15

Slide 15 text

Workflow 15 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Local Repo Remote Repo

Slide 16

Slide 16 text

Workflow 16 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo

Slide 17

Slide 17 text

Workflow 17 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add

Slide 18

Slide 18 text

Workflow 18 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add remove

Slide 19

Slide 19 text

Workflow 19 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add remove commit

Slide 20

Slide 20 text

Workflow 20 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add remove commit push

Slide 21

Slide 21 text

Workflow 21 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add remove commit push fetch

Slide 22

Slide 22 text

Workflow 22 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add remove commit push fetch pull or rebase

Slide 23

Slide 23 text

Workflow 23 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add remove commit push fetch pull or rebase checkout HEAD

Slide 24

Slide 24 text

Workflow 24 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Working Copy Index (stage) Local Repo Remote Repo add remove commit push fetch pull or rebase checkout HEAD commit -a

Slide 25

Slide 25 text

Workflow Overview 25 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 26

Slide 26 text

Workflow (in code) git clone [email protected]/foo.git foo_dir cd foo_dir git add -a git commit -m “Updated foo class” git push 26 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 27

Slide 27 text

Workflow (in code) git pull 27 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 28

Slide 28 text

Cheatsheet 28 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git git status git branch Git Overview git add -A changes git commit -m “” git push git init git clone [] git remote Status Setup git remote add origin git branch --set-upstream master origin/master git push origin master Create git pull Workflow UP Workflow DOWN git checkout git checkout -b Branching git merge git branch -d git fetch git merge git rebase files working copy Local Remote Beginner Intermediate Advanced v1.0.0 Created by Tomáš Jukin } It will be available at your table...

Slide 29

Slide 29 text

Installation • Windows • msysgit - http://goo.gl/YdToL • MacOS • brew install git • Linux • apt-get install git 29 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 30

Slide 30 text

GUI? • Windows • TortoiseGit - http://goo.gl/9Gfhn • SmartGit - http://goo.gl/P8QqD • MacOS • GitX (L) - http://goo.gl/AMiqc • Linux • Choose yours - http://goo.gl/TebDq 30 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 31

Slide 31 text

Next? 31 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git Git Flow “A final solution to branches, releases and versions”

Slide 32

Slide 32 text

Next? • GitHub - http://github.com • semver - http://semver.org • git flow (about) - http://goo.gl/MAF6m • git flow (CLI tool) - http://goo.gl/IbOJr • Interactive Git Cheatsheet - http://goo.gl/8yMZY 32 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 33

Slide 33 text

GitHub • Git repository hosting • Social Coding • Huge Community • Free public repos 33 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 34

Slide 34 text

GitHub • Now supports Dart! • .dart files • syntax highlight 34 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 35

Slide 35 text

Questions? • Yes, I will be there tomorrow to help ;-) ... 35 @GUGhackathon #darthack12 Tomáš Jukin @Inza - A (brief) introduction to git

Slide 36

Slide 36 text

Thanks for attention And happy coding! Tomáš Jukin @Inza 36 Google Global Dart Hackathon Prague 2012 @GUGhackathon #darthack12 Download me! http://goo.gl/I4LX0