These are the slides for a workshop I gave on June 2, 2014 at USC. They are an introduction to git and version control for my fellow scientists. Note that the branching section draws heavily on the diagrams and material from the Pro Git book (http://git-scm.com/book/), though I reimplemented them for my own uses.
31. git commit …
Outbox
commit: 83296a31...
author: Steven Hamblin
Date: Friday May 9, 20:03:39 2014
Fixed introduction in manuscript.tex
32.
33.
34. commit size
tree
author
committer
09f0e...
Steven
Steven
Initial commit.
tree size
blob
blob
blob
25351 manuscript.txt
README.md
3a44f
8762e
Figure1.pdf
blob size
This is going to be an
AWESOME NATURE PAPER!
blob size
... binary data ...
blob size
## README
This is the README for
my AWESOME NATURE PAPER.
de102...
09f0e...
25351...
3a44f...
8762e...
35.
36.
37.
38. git commit + git add
Outbox
commit: 83296a31...
author: Steven Hamblin
Date: Friday May 9, 20:03:39 2014
Fixed introduction in manuscript.tex
Outbox
manuscript.tex
• added 2 paragraphs
• deleted 3 lines
• moved 4 lines down
• ...
git commit -a —>
90. Exercise
1. Make uncommi ed changes.
2. Stash those changes
3. Switch branches. Make changes
and commit.
4. Switch back and retrieve your
stashed changes.