Home Explore Blog CI



git

4th chunk of `Documentation/git-svn.adoc`
22a96e462241aab5b47ca68a1b1c824bb8d81c5512049a100000000100000fa2
	Default: ".gitignore"

'rebase'::
	This fetches revisions from the SVN parent of the current HEAD
	and rebases the current (uncommitted to SVN) work against it.
+
This works similarly to `svn update` or 'git pull' except that
it preserves linear history with 'git rebase' instead of
'git merge' for ease of dcommitting with 'git svn'.
+
This accepts all options that 'git svn fetch' and 'git rebase'
accept.  However, `--fetch-all` only fetches from the current
[svn-remote], and not all [svn-remote] definitions.
+
Like 'git rebase'; this requires that the working tree be clean
and have no uncommitted changes.
+
This automatically updates the rev_map if needed (see
'$GIT_DIR/svn/\**/.rev_map.*' in the FILES section below for details).

-l;;
--local;;
	Do not fetch remotely; only run 'git rebase' against the
	last fetched commit from the upstream SVN.

'dcommit'::
	Commit each diff from the current branch directly to the SVN
	repository, and then rebase or reset (depending on whether or
	not there is a diff between SVN and head).  This will create
	a revision in SVN for each commit in Git.
+
When an optional Git branch name (or a Git commit object name)
is specified as an argument, the subcommand works on the specified
branch, not on the current branch.
+
Use of 'dcommit' is preferred to 'set-tree' (below).
+
--no-rebase;;
	After committing, do not rebase or reset.
--commit-url <URL>;;
	Commit to this SVN URL (the full path).  This is intended to
	allow existing 'git svn' repositories created with one transport
	method (e.g. `svn://` or `http://` for anonymous read) to be
	reused if a user is later given access to an alternate transport
	method (e.g. `svn+ssh://` or `https://`) for commit.
+
[verse]
config key: svn-remote.<name>.commiturl
config key: svn.commiturl (overwrites all svn-remote.<name>.commiturl options)
+
Note that the SVN URL of the commiturl config key includes the SVN branch.
If you rather want to set the commit URL for an entire SVN repository use
svn-remote.<name>.pushurl instead.
+
Using this option for any other purpose (don't ask) is very strongly
discouraged.

--mergeinfo=<mergeinfo>;;
	Add the given merge information during the dcommit
	(e.g. `--mergeinfo="/branches/foo:1-10"`). All svn server versions can
	store this information (as a property), and svn clients starting from
	version 1.5 can make use of it. To specify merge information from multiple
	branches, use a single space character between the branches
	(`--mergeinfo="/branches/foo:1-10 /branches/bar:3,5-6,8"`)
+
[verse]
config key: svn.pushmergeinfo
+
This option will cause git-svn to attempt to automatically populate the
svn:mergeinfo property in the SVN repository when possible. Currently, this can
only be done when dcommitting non-fast-forward merges where all parents but the
first have already been pushed into SVN.

--interactive;;
	Ask the user to confirm that a patch set should actually be sent to SVN.
	For each patch, one may answer "yes" (accept this patch), "no" (discard this
	patch), "all" (accept all patches), or "quit".
+
'git svn dcommit' returns immediately if answer is "no" or "quit", without
committing anything to SVN.

'branch'::
	Create a branch in the SVN repository.

-m;;
--message;;
	Allows to specify the commit message.

-t;;
--tag;;
	Create a tag by using the tags_subdir instead of the branches_subdir
	specified during git svn init.

-d<path>;;
--destination=<path>;;

	If more than one --branches (or --tags) option was given to the 'init'
	or 'clone' command, you must provide the location of the branch (or
	tag) you wish to create in the SVN repository.  <path> specifies which
	path to use to create the branch or tag and should match the pattern
	on the left-hand side of one of the configured branches or tags
	refspecs.  You can see these refspecs with the commands
+
	git config --get-all svn-remote.<name>.branches
	git config --get-all svn-remote.<name>.tags
+
where <name> is the name of the SVN repository as specified by the -R

Title: Git SVN Rebase, Dcommit, and Branch Commands
Summary
The git-svn tool provides commands for rebasing, committing, and branching in an SVN repository, including options for specifying commit messages, creating tags, and designating destinations for branches and tags, with various configuration keys and options available to customize the behavior of these commands.