Page tree
Skip to end of metadata
Go to start of metadata
  1. Install SubGit tool according to the appropriate Installation guide.

  2.  Import data into a local Git repository by the command:

    subgit import --authors-file AUTHORS_FILE --trunk TRUNK --branches BRANCHES --tags TAGS --username USER --password PASSWORD --svn-url SVN_URL GIT_REPO

    where

    • AUTHORS_FILE  – a path to authors file, that contains SVN-to-Git authors names mapping. For details, see Authors mapping user manual.
    • TRUNK         – a path, relative to SVN_URL, that leads to an SVN directory playing a role of the main line of development. For details see "Branches and Tags mapping" user manual.
    • BRANCHES      – a path, relative to SVN_URL, that leads to an SVN directory that contains SVN project's branches. For details see "Branches and Tags mapping" user manual.
    • TAGS          – a path, relative to SVN_URL, that leads to an SVN directory that contains SVN project's tags. For details see "Branches and Tags mapping" user manual.
    • USER          – an SVN username to be used to access the imported SVN project.
    • PASSWORD      – the SVN USER password
    • SVN_URL       – the SVN project URL.
    • GIT_REPO      – a path to a new local Git repository where data from the SVN project is being imported to.


     See the import command example…
    subgit import
    $ subgit import --authors-file /path/default/subgit/authors.txt--trunk trunk --branches branches --tags tags --username user --password Passw0rd  --svn-url 
    http://svn.example.com/svn/repository/project /home/user/project.git 
    
    SubGit version 3.2.6 ('Bobique') build #3714
    
    Translating Subversion revisions to Git commits...
    
        Subversion revisions translated: 2407.
    
        Total time: 2 hours 37 minutes 4 seconds.
    
    IMPORT SUCCESSFUL
  3. When the command is completed, you can clone your new Git repository and start working with it:

    git clone GIT_REPO WORK_TREE

    where 

        WORK_TREE – a path to your working copy.

     See git clone example…
    git clone example
    $ git clone file:///home/user/repo.git /home/user/repo_working_copy
          Cloning into '/home/user/repo_working_copy'...
          remote: Counting objects: 99, done.
          remote: Compressing objects: 100% (89/89), done.
          remote: Total 99 (delta 51), reused 0 (delta 0)
          Receiving objects: 100% (99/99), 8.96 KiB | 0 bytes/s, done.
          Resolving deltas: 100% (51/51), done.

    Empty working tree case

    If Git warns you that you are cloning an empty repository and you don't see your files in the working tree, most probably automatic branches and tags mapping didn't work correctly. In this case, mapping has to be set manually, see details on mapping in Branches and tags mapping.

  4. Get support:

    If you encounter any problems, see one of the following guides for more details:

Note:

For one-time import, no license is needed.

Should you need assistance, don't hesitate to contact us at support@subgit.com