Download - David Krmpotic: Git
![Page 1: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/1.jpg)
GITgit the basics right
david krmpotić
Saturday, November 28, 2009
![Page 2: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/2.jpg)
What is GIT?
• source control system• distributed• offline
Saturday, November 28, 2009
![Page 3: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/3.jpg)
Git is not....
Saturday, November 28, 2009
![Page 4: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/4.jpg)
Git is not....
Saturday, November 28, 2009
![Page 5: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/5.jpg)
GIT vs SVN
Saturday, November 28, 2009
![Page 6: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/6.jpg)
Basics
Saturday, November 28, 2009
![Page 7: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/7.jpg)
Basics
Saturday, November 28, 2009
![Page 8: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/8.jpg)
Basic Commands
• git init• git clone• git add + git commit• git push• git pull• git log
Saturday, November 28, 2009
![Page 9: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/9.jpg)
Git log
Saturday, November 28, 2009
![Page 10: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/10.jpg)
Everything is local
Saturday, November 28, 2009
![Page 11: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/11.jpg)
Staging Area (index)
• an intermediate step• allows flexibility• build commits the way you want
Saturday, November 28, 2009
![Page 12: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/12.jpg)
Why is it better than X?
• cheap local branching• everything is local• fast• small space• staging area• any workflow• GitHub
http://whygitisbetterthanx.comSaturday, November 28, 2009
![Page 13: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/13.jpg)
Branching
• git branch develop• git merge develop
Saturday, November 28, 2009
![Page 14: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/14.jpg)
FAST
Saturday, November 28, 2009
![Page 15: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/15.jpg)
Time to Take The Time!
• if you want to go faster, stop and learn GIT
Saturday, November 28, 2009
![Page 16: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/16.jpg)
Source Control Taxonomy
Saturday, November 28, 2009
![Page 17: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/17.jpg)
DAG (no deltas)
Saturday, November 28, 2009
![Page 18: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/18.jpg)
Source Control Taxonomy
Saturday, November 28, 2009
![Page 19: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/19.jpg)
Workflow
svn styleSaturday, November 28, 2009
![Page 20: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/20.jpg)
Integration Manager Workflow
Saturday, November 28, 2009
![Page 21: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/21.jpg)
Dictator and Lieutenants Workflow
Linux kernel developmentSaturday, November 28, 2009
![Page 22: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/22.jpg)
Object Database
• blob• tree• commit• (tag)
Saturday, November 28, 2009
![Page 23: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/23.jpg)
SHA
• Each object is identified by a SHA-1 hash of its contents
Saturday, November 28, 2009
![Page 24: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/24.jpg)
Blob
Saturday, November 28, 2009
![Page 25: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/25.jpg)
Tree
Saturday, November 28, 2009
![Page 26: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/26.jpg)
Commit
Saturday, November 28, 2009
![Page 27: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/27.jpg)
Saturday, November 28, 2009
![Page 28: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/28.jpg)
Immutable objects
Saturday, November 28, 2009
![Page 29: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/29.jpg)
Repository Internals
Saturday, November 28, 2009
![Page 30: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/30.jpg)
Branching commands
• git branch• git checkout• git merge• git rebase
Saturday, November 28, 2009
![Page 31: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/31.jpg)
Remotes
= remote branchThey take the form (remote)/(branch). For instance, if you wanted to see what the master branch on your origin remote looked like as of the last time you communicated with it, you would check the origin/master branch.
Saturday, November 28, 2009
![Page 32: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/32.jpg)
Tools
Saturday, November 28, 2009
![Page 33: David Krmpotic: Git](https://reader034.vdocuments.us/reader034/viewer/2022052617/54557a2caf7959795d8b47dd/html5/thumbnails/33.jpg)
Resources
• gitready.com• O’Reilly: Version Control with Git• PeepCode: Git• whygitisbetterthanx.com• gitcasts.com/git-talk• progit.org• [email protected]
Saturday, November 28, 2009