It is absolutely possible to just check out the trunk. From that guide, replace the git clone
command with the following, which will pick up the trunk and nothing else:
git svn clone {SVN repository URL} -A authors-transform.txt -T trunk
Note that this drops the --no-metadata
option; without the metadata, you won't be able to run a later fetch.
To add other directories later, you'll need to edit the .git/config
file. Add one of the following lines to the [svn-remote "svn"]
section, depending on what you want to have access to:
- To add a new single folder (like trunk), add `fetch = {folder path}:refs/remotes/{local branch name}
- To add a folder of branches (like the normal "branches" folder), add
branches = {folder path}/*:refs/remotes/*
.
- To add a folder of tags (like the normal "tags" folder), add
tags = {folder path}/*:refs/remotes/tags/*
.
Once you've updated the .git/config
file, just run git svn fetch
again, and it'll pull down the new directories.
That all said, I would recommend just leaving your git svn
operation going for a while (ie overnight): git svn
initialization can be very slow, particularly if there're a lot of files, commits or large binary files involved.