Bob Zoller

ruby, rails, san francisco, photography, startups, food

Find me on:
 - github
 - linkedin
 - flickr

migrate from svn to git (the full story)

let’s assume you have an svn repository available on some remote server. You want to migrate to git, but not lose all that yummy commit history. None of the posts I read quite managed to cover all the steps involved, so here they are:

setup the bare repo on your remote server


ssh example.com
mkdir -p /repos/my_app.git && cd /repos/my_app.git
git --bare init
exit

create a user mapping file

this temporary file will map usernames referenced in svn commit logs to new git-friendly ones. (referenced later as ~/Desktop/users.txt)

bob = Bob Zoller <bob@example.com>
carl = Carl Yestrau <carl@example.com>
phillip = Phillip Bensaid <phillip@example.com>
you might need to add strange entries for usernames like “password” or “(no author)”, so watch out for that.

use git-svn to fetch your existing svn repository


mkdir my_app_tmp
cd my_app_tmp
git-svn init svn+ssh://example.com/home/svn/my_app/trunk/ --no-metadata
git config svn.authorsfile ~/Desktop/users.txt
git-svn fetch
now wait… depending on the size of your svn repo, this can take a long time.

git-clone your tmp app


cd ..
git clone my_app_tmp my_app_clean

remove the remote branch


cd my_app_clean
git remote rm origin

add your new remote branch


git remote add origin ssh://example.com/repos/my_app.git

push local master to remote origin


git push origin master

kill the local temps and re-clone it


cd ..
rm -rf my_app_tmp my_app_clean
git clone svn://example.com/repos/my_app.git
NOW GET TO WORK!

Porchlight SF

Lea-Anne and I went to Porchlight SF last night. This month’s topic was obsession. All the storytellers were great, but two really stood out for me:

Kevin Thompson told a story about a big, barrel chested, “punker than you’ll ever fucking be or try to be” guy, who was obsessed with restoring his ‘64 Dodge Dart to full “vomiting blood” status. His impression of the guy was absolutely hilarious.

The other was Adam Savage (yes, the Mythbusters guy). Adam told a story (at break-neck speed I might add) about his obsession with rare things that were rare for a very specific reason. He described a folder on his computer (“that should be called fucking obsessions”) that contained 40+ gigs of pictures of things he found fascinating. The Dodo bird was one, specifically an exact scale replica of its skeleton. The Maltese Falcon was another. Stories of life-size digital prints, his (apparently false) self-imposed stigma that he wasn’t able to model organic objects, 3D laser scanners and friends with foundries ensued, and were simply fantastic.

Check out Porchlight SF, or don’t, it’s already crowded enough.

hot new Active Conference t-shirts, designed by Phil!

hot new Active Conference t-shirts, designed by Phil!

  • Bob: lol no dude - this is awesome feedback, don't kid yourself
  • Bob: I mean - good feedback wrapped in rob's asshole comments is still good feedback
  • Robert: I get worried bob
  • Robert: I'm a huge prick wrapped in a pretty wrapper