Overview
This article walks you through migrating your DreamHost SVN repository to Git.
This article assumes that you have previously created a Subversion repository in your DreamHost panel ,which is still accessible on the Subversion page.
Clone the SVN repository
- Log in to your website via SSH for the domain the SVN repo was configured on.
-
Navigate into your user's home directory.
[server]$ cd ~
-
You should see the svn directory listed here. For example:
[server]$ ls -la ~ | grep svn drwxr-xr-x 3 myuser pg1234567 78 Nov 18 2025 svn
-
Create a new directory to clone your SVN repository into.
You can name this anything you like. In this example, the directory is named svn-cloned.
[server]$ mkdir svn-cloned
-
Change into this new directory.
[server]$ cd svn-cloned
-
Run the git svn clone command to clone the repository into this directory.
The URL of the repository is on the Subversion page in your panel.
[server]$ git svn clone -s https://example.com/svnreponame/
This command creates a new directory named the same as your SVN repository.
-
Change into this directory.
[server]$ cd svnreponame
-
Run git log to view all commits.
[server]$ git log
You can now use git commands to manage this new git repository.
Non-standard repository layouts
If your repository layout is simple or does not follow the standard svn layout containing the trunk/, branches/, and tags/ directories, you can use the -T, -b, and -t options to specify your layout. View this Git page for further details.
Additional info
The commands above use the git svn clone command. This both initializes a new git repository while fetching the commits from your svn repository.
For more control over what is migrated, you could also choose to run git svn init if you'd like to initialize a repository while specifying subfolders, like a specific branch. Once created, you would then run git svn fetch to import the code. View this Git link for more information on available options and their settings.
See also
DreamHost links
Third-party links