Home Explore Blog CI



git

15th chunk of `Documentation/git-svn.adoc`
70e20a7aeacf3f7ef035f19cf21ff09e47ccba0d8ec286ad000000010000093b
 debug/*:refs/remotes/svn/debug/*

CONFIGURATION
-------------

'git svn' stores [svn-remote] configuration information in the
repository $GIT_DIR/config file.  It is similar the core Git
[remote] sections except 'fetch' keys do not accept glob
arguments; but they are instead handled by the 'branches'
and 'tags' keys.  Since some SVN repositories are oddly
configured with multiple projects glob expansions such those
listed below are allowed:

------------------------------------------------------------------------
[svn-remote "project-a"]
	url = http://server.org/svn
	fetch = trunk/project-a:refs/remotes/project-a/trunk
	branches = branches/*/project-a:refs/remotes/project-a/branches/*
	branches = branches/release_*:refs/remotes/project-a/branches/release_*
	branches = branches/re*se:refs/remotes/project-a/branches/*
	tags = tags/*/project-a:refs/remotes/project-a/tags/*
------------------------------------------------------------------------

Keep in mind that the `*` (asterisk) wildcard of the local ref
(right of the `:`) *must* be the farthest right path component;
however the remote wildcard may be anywhere as long as it's an
independent path component (surrounded by `/` or EOL).   This
type of configuration is not automatically created by 'init' and
should be manually entered with a text-editor or using 'git config'.

Also note that only one asterisk is allowed per word. For example:

	branches = branches/re*se:refs/remotes/project-a/branches/*

will match branches 'release', 'rese', 're123se', however

	branches = branches/re*s*e:refs/remotes/project-a/branches/*

will produce an error.

It is also possible to fetch a subset of branches or tags by using a
comma-separated list of names within braces. For example:

------------------------------------------------------------------------
[svn-remote "huge-project"]
	url = http://server.org/svn
	fetch = trunk/src:refs/remotes/trunk
	branches = branches/{red,green}/src:refs/remotes/project-a/branches/*
	tags = tags/{1.0,2.0}/src:refs/remotes/project-a/tags/*
------------------------------------------------------------------------

Multiple fetch, branches, and tags keys are supported:

------------------------------------------------------------------------
[svn-remote "messy-repo"]
	url = http://server.org/svn
	fetch = trunk/project-a:refs/remotes/project-a/trunk
	fetch

Title: Git SVN Configuration Options
Summary
This section describes the configuration options for git-svn, including the use of wildcards and glob patterns to specify branches and tags, as well as the syntax for specifying multiple branches and tags using comma-separated lists and braces, and how to manually edit the $GIT_DIR/config file to set up custom configurations.