26
* without warranty * without warranty a 30 MIN* workshop to Git VCS a 30 MIN* workshop to Git VCS

A practical 30m intro to Git vcs

Embed Size (px)

Citation preview

Page 1: A practical 30m intro to Git vcs

* without warranty* without warranty

a 30 MIN* workshop

to Git VCSa 30 MIN* workshop

to Git VCS

Page 2: A practical 30m intro to Git vcs

Hi !I am Olivier Garcia

○ software architect at Infrabel

○ co-founder of catchy.io

○ proud owner of lol.cat & swag.gg domains

Page 4: A practical 30m intro to Git vcs

VCS

○ RCS (Revision Control System) et diff : 1982

○ SCCS (Source Code Control System) : 1986-89

○ CVS (Concurrent Versions System) : 1990

○ SVN (Apache Subversion) : 2000

Page 5: A practical 30m intro to Git vcs

Git

○ Created by Linus Torvalds in ‘05, replacing Bitkeeper

○ Meant to deal with patch acceptation workflow

○ May ‘13, 36% use Git as main VCS (src: Eclipse Foundation)

○ ‘15 Github have 9M users

Page 6: A practical 30m intro to Git vcs

Git

○ Created by Linus Torvalds in ‘05, replacing Bitkeeper

○ Meant to deal with patch acceptation workflow

○ May ‘13, 36% use Git as main VCS (src: Eclipse Foundation)

○ ‘15 Github have 9M users

All guys in animatedGIFs(are/were) Githubers

Page 7: A practical 30m intro to Git vcs

Workshop, part 1 !

git initgit addgit statusgit commitgit log

Page 8: A practical 30m intro to Git vcs

Fun fact about Linus Torvald

Page 9: A practical 30m intro to Git vcs

Linus addressing NVidia

Page 10: A practical 30m intro to Git vcs

Linus addressing a co-worker

Mauro, SHUT THE FUCK UP!...How long have you been a maintainer? And you *still* haven't learnt the first rule of kernel maintenance?…Fix your approach to kernel programming.

Page 11: A practical 30m intro to Git vcs

… addressing another one

There aren't enough swear-words in the English language, so now I'll have to call you perkeleen vittupää* just to express my disgust and frustration with this crap.

* Seems to translate roughly to sonofabitch

Page 12: A practical 30m intro to Git vcs

Workshop, part 2 !

git configgit clonegit branchgit taggit checkoutgit push

Page 13: A practical 30m intro to Git vcs

Coffee time

Page 14: A practical 30m intro to Git vcs

Workshop, part 3 !

git add -pgit checkout -pgit checkout -git reset HEAD~3git clean

Page 15: A practical 30m intro to Git vcs

Everything in one place

No need of an internet connection to compare with trunk master

Git has efficient storage○ delta○ compression

Page 16: A practical 30m intro to Git vcs

Git can be big (e.g. Facebook’s)

Page 17: A practical 30m intro to Git vcs

Merge & Rebase

Both are meant to take the changes from one branch into another.

Page 18: A practical 30m intro to Git vcs

The situation

Page 19: A practical 30m intro to Git vcs

Merge

Page 20: A practical 30m intro to Git vcs

Rebase

Page 21: A practical 30m intro to Git vcs

Workshop, part 4 !

git mergegit rebase

Page 22: A practical 30m intro to Git vcs

Collaboration

○ Feature workflowMaster + Feature branches + Pull requests

○ Gitflow workflowMaster + Develop + Release + Feature branches

○ Forking workflowSeveral repositories + PR between repos

Page 23: A practical 30m intro to Git vcs

Collaboration

○ Feature workflowMaster + Feature branches + Pull requests

○ Gitflow workflowMaster + Develop + Release + Feature branches

○ Forking workflowSeveral repositories + PR between repos

Page 24: A practical 30m intro to Git vcs

Support for our team !

Olivier Garcia

Patrick Allaert

Yannick Vanhaeren

Page 25: A practical 30m intro to Git vcs

FINISHED !

Any questions?

You can find me at:@0livier (with a zero not a o)[email protected]

Page 26: A practical 30m intro to Git vcs

CREDITS

Special thanks to all the people who made and released these awesome resources:○ Rebase / Merge images from Atlassian○ Various GIF from gif.lol.cat○ Presentation template by SlidesCarnival○ Unsplash images