Home Explore Blog CI



git

2nd chunk of `Documentation/git-svn.adoc`
e0d50d9236dba26abed08bde024987f888dc8bf4a70568050000000100000fa4
 trailing slash.
	Setting a prefix (with a trailing slash) is strongly
	encouraged in any case, as your SVN-tracking refs will
	then be located at "refs/remotes/$prefix/*", which is
	compatible with Git's own remote-tracking ref layout
	(refs/remotes/$remote/*). Setting a prefix is also useful
	if you wish to track multiple projects that share a common
	repository.
	By default, the prefix is set to 'origin/'.
+
NOTE: Before Git v2.0, the default prefix was "" (no prefix). This
meant that SVN-tracking refs were put at "refs/remotes/*", which is
incompatible with how Git's own remote-tracking refs are organized.
If you still want the old default, you can get it by passing
`--prefix ""` on the command line (`--prefix=""` may not work if
your Perl's Getopt::Long is < v2.37).

--ignore-refs=<regex>;;
	When passed to 'init' or 'clone' this regular expression will
	be preserved as a config key.  See 'fetch' for a description
	of `--ignore-refs`.
--ignore-paths=<regex>;;
	When passed to 'init' or 'clone' this regular expression will
	be preserved as a config key.  See 'fetch' for a description
	of `--ignore-paths`.
--include-paths=<regex>;;
	When passed to 'init' or 'clone' this regular expression will
	be preserved as a config key.  See 'fetch' for a description
	of `--include-paths`.
--no-minimize-url;;
	When tracking multiple directories (using --stdlayout,
	--branches, or --tags options), git svn will attempt to connect
	to the root (or highest allowed level) of the Subversion
	repository.  This default allows better tracking of history if
	entire projects are moved within a repository, but may cause
	issues on repositories where read access restrictions are in
	place.  Passing `--no-minimize-url` will allow git svn to
	accept URLs as-is without attempting to connect to a higher
	level directory.  This option is off by default when only
	one URL/branch is tracked (it would do little good).

'fetch'::
	Fetch unfetched revisions from the Subversion remote we are
	tracking.  The name of the [svn-remote "..."] section in the
	$GIT_DIR/config file may be specified as an optional
	command-line argument.
+
This automatically updates the rev_map if needed (see
'$GIT_DIR/svn/\**/.rev_map.*' in the FILES section below for details).

--localtime;;
	Store Git commit times in the local time zone instead of UTC.  This
	makes 'git log' (even without --date=local) show the same times
	that `svn log` would in the local time zone.
+
This doesn't interfere with interoperating with the Subversion
repository you cloned from, but if you wish for your local Git
repository to be able to interoperate with someone else's local Git
repository, either don't use this option or you should both use it in
the same local time zone.

--parent;;
	Fetch only from the SVN parent of the current HEAD.

--ignore-refs=<regex>;;
	Ignore refs for branches or tags matching the Perl regular
	expression. A "negative look-ahead assertion" like
	`^refs/remotes/origin/(?!tags/wanted-tag|wanted-branch).*$`
	can be used to allow only certain refs.
+
[verse]
config key: svn-remote.<name>.ignore-refs
+
If the ignore-refs configuration key is set, and the command-line
option is also given, both regular expressions will be used.

--ignore-paths=<regex>;;
	This allows one to specify a Perl regular expression that will
	cause skipping of all matching paths from checkout from SVN.
	The `--ignore-paths` option should match for every 'fetch'
	(including automatic fetches due to 'clone', 'dcommit',
	'rebase', etc) on a given repository.
+
[verse]
config key: svn-remote.<name>.ignore-paths
+
If the ignore-paths configuration key is set, and the command-line
option is also given, both regular expressions will be used.
+
Examples:
+
--
Skip "doc*" directory for every fetch;;
+
------------------------------------------------------------------------
--ignore-paths="^doc"
------------------------------------------------------------------------

Skip "branches" and "tags" of first level directories;;

Title: Git SVN Fetch and Configuration Options
Summary
The git-svn fetch command retrieves unfetched revisions from a Subversion remote, and various options are available to customize its behavior, including ignoring certain refs or paths, setting the localtime, and specifying parents, with corresponding configuration keys for persistent settings.