David Krmpotic: Git
description
Transcript of David Krmpotic: Git
GITgit the basics right
david krmpotić
Saturday, November 28, 2009
What is GIT?
• source control system• distributed• offline
Saturday, November 28, 2009
Git is not....
Saturday, November 28, 2009
Git is not....
Saturday, November 28, 2009
GIT vs SVN
Saturday, November 28, 2009
Basics
Saturday, November 28, 2009
Basics
Saturday, November 28, 2009
Basic Commands
• git init• git clone• git add + git commit• git push• git pull• git log
Saturday, November 28, 2009
Git log
Saturday, November 28, 2009
Everything is local
Saturday, November 28, 2009
Staging Area (index)
• an intermediate step• allows flexibility• build commits the way you want
Saturday, November 28, 2009
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
Branching
• git branch develop• git merge develop
Saturday, November 28, 2009
FAST
Saturday, November 28, 2009
Time to Take The Time!
• if you want to go faster, stop and learn GIT
Saturday, November 28, 2009
Source Control Taxonomy
Saturday, November 28, 2009
DAG (no deltas)
Saturday, November 28, 2009
Source Control Taxonomy
Saturday, November 28, 2009
Workflow
svn styleSaturday, November 28, 2009
Integration Manager Workflow
Saturday, November 28, 2009
Dictator and Lieutenants Workflow
Linux kernel developmentSaturday, November 28, 2009
Object Database
• blob• tree• commit• (tag)
Saturday, November 28, 2009
SHA
• Each object is identified by a SHA-1 hash of its contents
Saturday, November 28, 2009
Blob
Saturday, November 28, 2009
Tree
Saturday, November 28, 2009
Commit
Saturday, November 28, 2009
Saturday, November 28, 2009
Immutable objects
Saturday, November 28, 2009
Repository Internals
Saturday, November 28, 2009
Branching commands
• git branch• git checkout• git merge• git rebase
Saturday, November 28, 2009
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
Tools
Saturday, November 28, 2009
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