Download - Git, an Illustrated Primer
![Page 1: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/1.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
GIT: An Illustrated Primer
![Page 2: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/2.jpg)
http://mojolive.com/profile/dcousineau
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 3: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/3.jpg)
History
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 4: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/4.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
BitKeeper No Longer Free To Use
Linux Kernel RequiresDistributed
Performant
SVN and CVS... Not So Much
“CVS is what we should NOT do...”
![Page 5: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/5.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
GITthus,
![Page 6: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/6.jpg)
gItting started
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 7: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/7.jpg)
+Linux
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> sudo apt-get install git$> sudo yum install git$> echo "Seriously?"
![Page 8: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/8.jpg)
+OSX
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
http://git-scm.com
![Page 9: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/9.jpg)
+OSX
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)$> brew install git$> say "Win!"
![Page 10: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/10.jpg)
+Windows
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
http://windows.github.com
![Page 11: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/11.jpg)
+Gitting STarted
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 12: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/12.jpg)
+My First Repo
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 13: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/13.jpg)
+Stage New Files
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 14: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/14.jpg)
+Commit Staging
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 15: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/15.jpg)
+staging?
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
working directory
index
repository
![Page 16: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/16.jpg)
+staging?
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
working directory
index
repository
“staging”
![Page 17: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/17.jpg)
+staging?
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
working directory
index
repository
modify
![Page 18: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/18.jpg)
+staging?
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
working directory
index
repository
git add
![Page 19: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/19.jpg)
+staging?
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
working directory
index
repository git commit
![Page 20: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/20.jpg)
+Directories
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 21: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/21.jpg)
+Modify
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 22: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/22.jpg)
+Branch!
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 23: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/23.jpg)
+Back to Master
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 24: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/24.jpg)
+Merge!
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 25: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/25.jpg)
+stashing
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 26: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/26.jpg)
+Popping
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 27: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/27.jpg)
branching
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 28: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/28.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
a b c
MASTER
HEAD
![Page 29: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/29.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
a b c
MASTER
DEVELOP
create new branch
HEAD
![Page 30: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/30.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
a b c
MASTER
DEVELOP
Checkout new branch
HEAD
![Page 31: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/31.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
a b c
MASTER
DEVELOP
commit to develop
d
HEAD
![Page 32: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/32.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
commit to master HEAD
a b c
MASTER
DEVELOP
d
e
![Page 33: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/33.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
a b c
MASTER
DEVELOP
merge Develop
d
e
f
![Page 34: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/34.jpg)
Remote
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 35: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/35.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
SVN GIT
d
e
b
a
c
d
e
b
a
c
d d
e
b
a
c
![Page 36: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/36.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 37: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/37.jpg)
+Create a Project
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 38: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/38.jpg)
+Create a Project
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 39: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/39.jpg)
+Doing as I am told
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 40: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/40.jpg)
+did as I was told
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 41: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/41.jpg)
+Push Again!
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 42: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/42.jpg)
+Fetching & Merging
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 43: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/43.jpg)
+Pulling
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 44: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/44.jpg)
+Two Authors Two Pushes
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 45: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/45.jpg)
+Two Authors Two Pushes
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 46: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/46.jpg)
+AFtermath
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 47: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/47.jpg)
+Aftermath
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 48: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/48.jpg)
+Aftermath
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 49: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/49.jpg)
+AFtermath
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 50: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/50.jpg)
+forking
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 51: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/51.jpg)
+pull requests
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 52: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/52.jpg)
+MAke Changes IN A NEW BRANCH
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 53: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/53.jpg)
+Push Changes
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 54: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/54.jpg)
+See Our New Branch
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 55: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/55.jpg)
+Create Pull Request
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 56: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/56.jpg)
+Oh Look, Our Pull Request
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 57: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/57.jpg)
+Oh Look Our Pull Request
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 58: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/58.jpg)
+Oh Look, It’s Merged In!
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 59: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/59.jpg)
+Remotes
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 60: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/60.jpg)
+Adding Another Remote
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 61: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/61.jpg)
+create and sync new branches
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 62: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/62.jpg)
+Delete local and remote branches
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 63: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/63.jpg)
+Pull From One, Push To Another
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 64: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/64.jpg)
GIT FLow
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 65: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/65.jpg)
htt
p://
nv
ie.c
om
/po
sts/
a-
suc
ce
ssfu
l-g
it-
br
an
ch
ing
-m
od
el/
![Page 66: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/66.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 67: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/67.jpg)
Subversion and GIT
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 68: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/68.jpg)
+et voilà
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git svn clone -s -r 1000:HEAD https://url/to/repo ./wkngcpy$> git svn show-ignore > .gitignore
![Page 69: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/69.jpg)
+Workflow
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
Normal GIT Workflow
![Page 70: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/70.jpg)
+Sync
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git svn dcommit --dry-run$> git svn dcommit$> git svn rebase
![Page 71: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/71.jpg)
+With some caveats
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
anything that has been dcommit’d
is set in stone! do. not. touch.
git branches wellsvn... not so much
![Page 72: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/72.jpg)
+Local Branching
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git merge --squash branch
![Page 73: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/73.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
git merge --squash localbrn
HEAD
a b
c
MASTER
localbrn
d e
![Page 74: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/74.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
git merge --squash localbrn
HEAD
a b
MASTER
DEC
![Page 75: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/75.jpg)
+Why?
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
SVN is TERRIBLE at merges
git-svn will do it if you don’tand when it fails, it does so spectacularly
you’ll just litter your commit history
![Page 76: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/76.jpg)
+tracking svn branches
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git checkout -t remotes/branchname
![Page 77: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/77.jpg)
+creating remote branches
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git svn branch -m “Creating new branch” branchname$> git checkout -t remotes/branchname
![Page 78: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/78.jpg)
+personal opinion
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
except for release taggingand a develop branch
don’t bother with remote branchingjust stick to local and squashes
![Page 79: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/79.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
use git svn locally
push for team
adoption
procure git server
full clone push to new
git server
![Page 80: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/80.jpg)
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
use git svn locally
push for team
adoption
procure git server
full clone push to new
git server
![Page 81: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/81.jpg)
Advanced Usage
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 82: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/82.jpg)
+reset my local changes
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git checkout -- .
tell git “no more options!”
![Page 83: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/83.jpg)
+Replay Last commit
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git reset --mixed REF
![Page 84: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/84.jpg)
+Gitting Ready
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 85: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/85.jpg)
+Results
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 86: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/86.jpg)
+Undo Last commit
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git reset --hard HEAD^
HEAD^ means commit prior to HEAD. HEAD^2 is 2
commits prior, etc etc.
![Page 87: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/87.jpg)
+“Oops i forgot to branch”
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git branch newbranchname$> git reset --hard SHA
commit immediately before the intended first commit
of our new branch
![Page 88: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/88.jpg)
+“Oops i forgot to branch”
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 89: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/89.jpg)
+“Oops i forgot to branch”
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 90: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/90.jpg)
+“Oops I accidentally the commit message”
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git rebase --interactive SHA
commit immediately preceding the commit in
question
![Page 91: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/91.jpg)
+Oops
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 92: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/92.jpg)
+Lay of the land
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 93: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/93.jpg)
+Making decisions
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 94: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/94.jpg)
+Reach 88MPH
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 95: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/95.jpg)
+Fun with Paradoxes
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 96: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/96.jpg)
+Fruits of our labor
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 97: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/97.jpg)
+“Oops I committed the private key”
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git filter-branch --index-filter \ 'git rm --cached --ignore-unmatch secret.key' \ --prune-empty --tag-name-filter cat -- --all
ಠ_ಠ
![Page 98: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/98.jpg)
+Terrible Mistake
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 99: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/99.jpg)
+gone now, here yesterday
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 100: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/100.jpg)
+VooDoo Magic
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 101: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/101.jpg)
+Results
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 102: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/102.jpg)
+Cleanup The Mess
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 103: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/103.jpg)
+Look Ma, No secret.key!
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 104: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/104.jpg)
THANKS. FOR YOUR ATTENTION
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
![Page 105: Git, an Illustrated Primer](https://reader037.vdocument.in/reader037/viewer/2022102706/558e67261a28ab87218b46f4/html5/thumbnails/105.jpg)
+further resources
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
http://git-scm.com/book
FREE!Attribution-NonCommercial-ShareAlike 3.0 Unported
https://help.github.com