- Install SubGit tool according to the appropriate Installation guide.
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
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
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.
Expand title See the import command example… Code Block language text theme FadeToGrey title 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
When the command is completed, you can clone your new Git repository and start to work working with it:
git clone GIT_REPO WORK_TREE
WORK_TREE– a path to your working copy.
Expand title See git clone example… Code Block language text theme FadeToGrey title 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.
Warning title 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.
- Get support:
Have If you faced with encounter any problems, see one of the following guide guides for more details:
For one-time import, no license key required for import!
Should you need assistance, don't hesitate to contact us at email@example.com.