Now that I have basically fallen for Git, I decided to finally move my Subversion repository over to Git (this way I can finally have a remote backup of it that I am comfortable with on Codaset).
The method for this was a lot more straightforward than I expected it to be. For the conversion tool, I used Nirvdrums fork of svn2git. It a feature complete version of the svn2git portion though the rest of it is still is development. Since it is a Ruby gem, getting it installed was a breeze. Just make sure that you have Ruby and rubygems installed.
Successfully installed svn2git-1.3.1
1 gem installed
Installing ri documentation for svn2git-1.3.1...
Installing RDoc documentation for svn2git-1.3.1...
Then I created a authors.txt file to make sure the subversion committers got transferred over to Git cleanly. The file looked like this:
elubow = Eric Lubow <myemail@here.com>
Then I went to my Remote Code Storage Location of choice (Codaset) and created an empty repository for my personal files. I then cloned the repository to my local machine:
Then I changed into the directory of the personal-files git repository and ran the following command:
Checked out HEAD:
file://localhost/Users/elubow/Library/Subversion r234
Note: moving to "trunk" which isnt a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at e4708ee... Updated mail tools to latest versions
Switched to a new branch "master"
Counting objects: 668, done.
Delta compression using 2 threads.
Compressing objects: 100% (595/595), done.
Writing objects: 100% (668/668), done.
Total 668 (delta 280), reused 0 (delta 0)
Removing duplicate objects: 100% (256/256), done.
beacon:personal-files elubow$ ls -l
total 0
...
Actual stuff here but removed for brevity
...
The entire process took me about 15 minutes. Then I did a simple git push back to Codaset to save all my changes.
Counting objects: 668, done.
Delta compression using 2 threads.
Compressing objects: 100% (315/315), done.
Writing objects: 100% (668/668), 240.37 KiB, done.
Total 668 (delta 280), reused 668 (delta 280)
=> Welcome to Codaset
=> Syncing Codaset... To git@codaset.com:elubow/personal-files.git
* [new branch] master -> master
[OK]
Related posts:
