git quick intro

14
Revision Control Systems > git add hello.js > git commit -m “Initial Commit” > git push origin

Upload: corneliu-claudiu-prodescu

Post on 28-Nov-2014

215 views

Category:

Education


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Git Quick Intro

Revision Control Systems> git add hello.js > git commit -m “Initial Commit” > git push origin

Page 2: Git Quick Intro

Source Control - Why?

> rm -rf src/ foo “Did you mean rm -rf src/foo ?” “Ok, now how do we get this back? :|”

Page 3: Git Quick Intro

Source Control - Why?

> gcc mymodule.c Error : Unknown method update() at foo:42: obj.update() // Joey: I will add it later !

“If only I had a way to develop in containment, without Joey”

Page 4: Git Quick Intro

Source Control - Why?Sure! Here you go: src.tar.gz Jake > Hi there, > I am interested in your project. I would like to > help. Where could I get the source code? > > Thanks, Joey !!“If only there would be a simpler way”

Page 5: Git Quick Intro

Source Control - git> git log commit da6883cb7b712b2a305b47c4ab29184c1e328c30 Author: Corneliu Prodescu <[email protected]> Date: Fri Feb 14 17:22:32 2014 +0100 ! Update data/ to harvest format 3.0. !commit 1727e164a8b22b22b5d236791f4ab4e4901dd04b Author: raduh <[email protected]> Date: Thu Feb 13 16:30:09 2014 +0100 ! Add proper error handling.

Page 6: Git Quick Intro

Source Control - git

> edit hello.js !

> git add hello.js > git commit -m “Implement magical feature.” > git push origin

Page 7: Git Quick Intro

Source Control - git

> git branch --list * magical-feature master > git checkout master > git branch --list magical-feature * master

Page 8: Git Quick Intro

Source Control - git demo

* edit & commit & push flow * .gitignore

Page 9: Git Quick Intro

Source Control - git demo

* reset * checkout

Page 10: Git Quick Intro

Source Control - git demo

* branch * merge / rebase * cherry-pick

Page 11: Git Quick Intro

Source Control - git demo

* remote * fetch * pull (fetch + merge) * push

Page 12: Git Quick Intro

Source Control - github.com

* free git hosting tool * easy to publish / host repositories

Page 13: Git Quick Intro

Source Control - github.com

* provides code review tool (pull requests)

Page 14: Git Quick Intro

Source Control - Done

* Thank you! * Questions? * Even more questions - http://git-scm.com/