A collaborative reboot for version control
GIT FOR THE
UNINITIATED
Slide 2
Slide 2 text
Matthew....
@matthewmccull
‣Open source contributor
‣O'Reilly Git Video Co-instructor
‣Co-Author of O'Reilly's Git book
‣5-year Git trainer
‣Instructor at GitHub
Slide 3
Slide 3 text
http://oreil.ly/ogitvid
Slide 4
Slide 4 text
http://amzn.to/oreillygit
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
No content
Slide 7
Slide 7 text
No content
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
Version Control
A refreshed approach to VCS
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
Open Source
Slide 12
Slide 12 text
bash scripts ☛ C code
Slide 13
Slide 13 text
is not a
slightly better
Slide 14
Slide 14 text
No content
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
No content
Slide 17
Slide 17 text
http://git-scm.com
Slide 18
Slide 18 text
Starting Up
Creating a repository
Slide 19
Slide 19 text
Get a GitHub account.
Slide 20
Slide 20 text
Get a GitHub account.
http://github.com/signup/free
Slide 21
Slide 21 text
Create a new repo(sitory).
Slide 22
Slide 22 text
Add a file.
Slide 23
Slide 23 text
View the commit history (timeline).
Slide 24
Slide 24 text
Make changes to the file.
Slide 25
Slide 25 text
Repo Creation
Local and remote initialization simplicity
Slide 26
Slide 26 text
# Green field project
$ git init newproject
$ cd newproject
# ...start coding
Slide 27
Slide 27 text
or if you already have source code
Slide 28
Slide 28 text
# Legacy project tree
$ cd existingproject
$ git init
# Add all the code
$ git add .
$ git commit -m”Initial import”
Slide 29
Slide 29 text
‣Blob
‣Tree
‣Commit
‣Tag
Slide 30
Slide 30 text
tree
tree: 7e8b1 web
blob: 9ab16 index.html
a10b3 tree
blob: 8d162 logo.jpg
blob: 51d22 draw.js
7e8b1
commit
tree: a10b3
parent: nil
author: Fird
committer: Matthew
message:
Major refactoring
of the web content.
c67db
blob
9ab16
blob
//Some more javascript
var renderSize
51d22
blob
7D 8D B3 7F BD 12 9F E9
7B 78 9D 3F 5C A6 72 CB
8d162
Slide 31
Slide 31 text
Collaborating
Two authors
Slide 32
Slide 32 text
Make simultaneous changes to the file.
Slide 33
Slide 33 text
Collaborating Redux
Untrusted collaborators
Slide 34
Slide 34 text
Untrusted changes to the file.
Slide 35
Slide 35 text
Changelist
Three stage thinking
Slide 36
Slide 36 text
Working Staging Repo
add
commit
edit
Slide 37
Slide 37 text
No content
Slide 38
Slide 38 text
‣shopping cart
‣put things in
‣take things out
‣purchase at register
Slide 39
Slide 39 text
v1 v2 v3 v4
File A
File B
File C
File A
File B File B
File C
v5
File A
File B
File B
File A File A
File C File C File C
I'm an egotistical bastard, and I name
all my projects after myself.
First Linux, now
git.
-Linus Torvalds
“
Credits: Martin Streicher, http://en.wikipedia.org/wiki/File:Linus_Torvalds.jpeg
Slide 89
Slide 89 text
CVS
Subversion
PVCS
Perforce
Clear
Case
Source
Safe
RCS
Folders