4. Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
BitKeeper No Longer Free To Use
Linux Kernel Requires
Distributed
Performant
SVN and CVS... Not So Much
“CVS is what we should NOT do...”
5. Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
GIT
thus,
70. +Sync
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git svn dcommit --dry-run
$> git svn dcommit
$> git svn rebase
71. +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 well
svn... not so much
73. Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
git merge --squash localbrn
HEAD
a b
c
MASTER
localbrn
d e
74. Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
git merge --squash localbrn
HEAD
a b
MASTER
DEC
75. +Why?
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
SVN is TERRIBLE at merges
git-svn will do it if you don’t
and when it fails, it does so spectacularly
you’ll just litter your commit history
76. +tracking svn branches
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
$> git checkout -t remotes/branchname
77. +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
78. +personal opinion
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
except for release tagging
and a develop branch
don’t bother with remote branching
just stick to local and squashes
79. 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
80. 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
86. +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.
87. +“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
88. +“Oops i forgot to branch”
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
89. +“Oops i forgot to branch”
Daniel Cousineau // follow me : @dcousineau or http://dcousineau.com
90. +“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