Import Subversion repository into Git

I have an existing SVN repository at Out of curiosity, I created a repository at as well, and added some files to it. Can I now take the Sousa folder and import that into the GitHub directory, maintaining the change history, or is that more trouble than it’s worth? (I have a decent understanding of svn, but git is brand new to me.)

  • Git remote two branches same name different case
  • Git deleted untracked files on pull
  • Can I make git diff only show the changed file names?
  • Automatically run Git hook when creating a Git tag
  • Git: exclude committed file from pull request
  • Terminology used by Git
  • Can Emacs display entire git history of a file without requiring git.el?
  • What goes wrong when using git worktree with git submodules
  • Missing ranges error message when reintegrating a branch into trunk in Subversion 1.5
  • Git Alias - Multiple Commands and Parameters
  • Git: only stage modified files, not removals or additions
  • Working while waiting for pending PR
  • 2 Solutions collect form web for “Import Subversion repository into Git”

    I believe that would be possible. There may be a way to do it all from one local repo, but I’m pretty confident that this would work. Assuming you’re starting from scratch with no local repos:

    • git svn clone your SVN repo to a local git repo (hereafter known as svn-repo)
    • git clone your github repo to a local repo (known as github-repo)
    • In github-repo, git remote add svn-repo <url> using a local file URL
    • git fetch svn-repo
    • git merge svn-repo/master to merge the master branch of svn-repo into github-repo
    • Then just push to github

    There are many tutorials online about importing subversion into git. As far as it being a hassle, it’s only (3-4 commands). It’s worth doing, unless you don’t want to keep your svn repo’s history.

    Here’s githubs guide to pulling it off

    Git Baby is a git and github fan, let's start git clone.