Merge branch 'maint'
[gitweb.git] / Documentation / git-svn.txt
index e157c6ab501a574b929bd73c427313874c3a3e90..c9e4efe7f4678ecc0beb87b387c71a7ebd0efc71 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 DESCRIPTION
 -----------
 git-svn is a simple conduit for changesets between Subversion and git.
-It is not to be confused with gitlink:git-svnimport[1], which is
+It is not to be confused with linkgit:git-svnimport[1], which is
 read-only.
 
 git-svn was originally designed for an individual developer who wants a
@@ -61,6 +61,16 @@ COMMANDS
        Set the 'useSvnsyncProps' option in the [svn-remote] config.
 --rewrite-root=<URL>;;
        Set the 'rewriteRoot' option in the [svn-remote] config.
+--use-log-author;;
+       When retrieving svn commits into git (as part of fetch, rebase, or
+       dcommit operations), look for the first From: or Signed-off-by: line
+       in the log message and use that as the author string.
+--add-author-from;;
+       When committing to svn from git (as part of commit or dcommit
+       operations), if the existing log message doesn't already have a
+       From: or Signed-off-by: line, append a From: line based on the
+       git commit's author string.  If you use this, then --use-log-author
+       will retrieve a valid author string for all commits.
 --username=<USER>;;
        For transports that SVN handles authentication for (http,
        https, and plain svn), specify the username.  For other
@@ -159,8 +169,26 @@ New features:
        our version of --pretty=oneline
 --
 +
+NOTE: SVN itself only stores times in UTC and nothing else. The regular svn
+client converts the UTC time to the local time (or based on the TZ=
+environment). This command has the same behaviour.
++
 Any other arguments are passed directly to `git log'
 
+'blame'::
+       Show what revision and author last modified each line of a file. The
+       output of this mode is format-compatible with the output of
+       `svn blame' by default. Like the SVN blame command,
+       local uncommitted changes in the working copy are ignored;
+       the version of the file in the HEAD revision is annotated. Unknown
+       arguments are passed directly to git-blame.
++
+--git-format;;
+       Produce output in the same format as `git blame', but with
+       SVN revision numbers instead of git commit hashes. In this mode,
+       changes that haven't been committed to SVN (including local
+       working-copy edits) are shown as revision 0.
+
 --
 'find-rev'::
        When given an SVN revision number of the form 'rN', returns the
@@ -177,6 +205,12 @@ Any other arguments are passed directly to `git log'
        commit.  All merging is assumed to have taken place
        independently of git-svn functions.
 
+'create-ignore'::
+       Recursively finds the svn:ignore property on directories and
+       creates matching .gitignore files. The resulting files are staged to
+       be committed, but are not committed. Use -r/--revision to refer to a
+       specfic revision.
+
 'show-ignore'::
        Recursively finds and lists the svn:ignore property on
        directories.  The output is suitable for appending to
@@ -193,6 +227,25 @@ Any other arguments are passed directly to `git log'
        repository (that has been init-ed with git-svn).
        The -r<revision> option is required for this.
 
+'info'::
+       Shows information about a file or directory similar to what
+       `svn info' provides.  Does not currently support a -r/--revision
+       argument.  Use the --url option to output only the value of the
+       'URL:' field.
+
+'proplist'::
+       Lists the properties stored in the Subversion repository about a
+       given file or directory.  Use -r/--revision to refer to a specific
+       Subversion revision.
+
+'propget'::
+       Gets the Subversion property given as the first argument, for a
+       file.  A specific revision can be specified with -r/--revision.
+
+'show-externals'::
+       Shows the Subversion externals.  Use -r/--revision to specify a
+       specific revision.
+
 --
 
 OPTIONS
@@ -202,7 +255,7 @@ OPTIONS
 --shared[={false|true|umask|group|all|world|everybody}]::
 --template=<template_directory>::
        Only used with the 'init' command.
-       These are passed directly to gitlink:git-init[1].
+       These are passed directly to linkgit:git-init[1].
 
 -r <ARG>::
 --revision <ARG>::
@@ -255,7 +308,7 @@ config key: svn.edit
 Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
 
 They are both passed directly to git-diff-tree see
-gitlink:git-diff-tree[1] for more information.
+linkgit:git-diff-tree[1] for more information.
 
 [verse]
 config key: svn.l
@@ -293,7 +346,7 @@ with many revisions.
 to fetch before repacking.  This defaults to repacking every
 1000 commits fetched if no argument is specified.
 
---repack-flags are passed directly to gitlink:git-repack[1].
+--repack-flags are passed directly to linkgit:git-repack[1].
 
 [verse]
 config key: svn.repack
@@ -404,7 +457,7 @@ section because they affect the 'git-svn-id:' metadata line.
 BASIC EXAMPLES
 --------------
 
-Tracking and contributing to the trunk of a Subversion-managed project:
+Tracking and contributing to the trunk of a Subversion-managed project:
 
 ------------------------------------------------------------------------
 # Clone a repo (like git clone):
@@ -450,10 +503,13 @@ have each person clone that repository with 'git clone':
 ------------------------------------------------------------------------
 # Do the initial import on a server
        ssh server "cd /pub && git-svn clone http://svn.foo.org/project
-# Clone locally
-       git clone server:/pub/project
-# Tell git-svn which branch contains the Subversion commits
-       git update-ref refs/remotes/git-svn origin/master
+# Clone locally - make sure the refs/remotes/ space matches the server
+       mkdir project
+       cd project
+       git-init
+       git remote add origin server:/pub/project
+       git config --add remote.origin.fetch=+refs/remotes/*:refs/remotes/*
+       git fetch
 # Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
        git-svn init http://svn.foo.org/project
 # Pull the latest changes from Subversion
@@ -555,11 +611,11 @@ however the remote wildcard may be anywhere as long as it's own
 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
-gitlink:git-config[1]
+linkgit:git-config[1]
 
 SEE ALSO
 --------
-gitlink:git-rebase[1]
+linkgit:git-rebase[1]
 
 Author
 ------