Skip to content

Instantly share code, notes, and snippets.

@m-kyle
Last active August 8, 2017 10:10
Show Gist options
  • Save m-kyle/2d967f3a75428da216c5 to your computer and use it in GitHub Desktop.
Save m-kyle/2d967f3a75428da216c5 to your computer and use it in GitHub Desktop.
Cloning SVN repository to git and pushing to GitLab

Import SVN repository to GitLab

  • Create new project in GitLab
  • Clone SVN to git

On local command line:

  1. Create users.txt file in folder where new repository will go. Add usernames, names and email address of each user, like so:

    mcc.pete Pete Robinson <pete@example.com>
    
  2. Clone SVN repository into a git repository:

    git svn clone --stdlayout --no-metadata -A users.txt https://web.srvrs.co.uk/svn/apache-yubikey
    

    This can be slow, be patient.

  3. cd apache-yubikey

  4. Create new project in GitLab

  5. git remote add origin git@172.16.3.10:ttm/apache-yubikey.git

    Command will be listed on gitlab project screen when you create new project -- copy from there.

  6. git push -u origin master

note: If there are unknown users, the git svn clone command will stop, in which case, update users.txt, cd apache-yubikey and git svn fetch will continue from where it stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment