Page tree

'subgit map' command allows one to find out:

  • how SVN paths are mapped to Git branches and paths and whether they are translated at all;
  • how Git branches and paths are mapped to SVN paths and whether they are translated at all;
  • how SVN authors are mapped to Git authors and vice versa.

By default it produces output in grep-friendly format but `--json` option forces to produce JSON format.

If the repository specified, 'subgit map' maps paths and authors using that repository config. If shared daemon is specified, 'subgit map' runs for each repository registered in the shared daemon. If nether repository nor shared daemon is specified, 'subgit map' runs for every registered repository.

If the SVN URL is specified, 'subgit map' shows repository name, Git branch, and path relative to the project root (defined by 'svn.url' option) in the following format:

Output format
/path/to/repository
refs/heads/branchname
path/relative/to/project/root
<empty line>

The same is true if SVN path is specified. The SVN path should have no leading or trailing slashes and is relative to the project root. If the SVN URL or path are not translated, the command gives no output.

In case of running 'subgit map' on shared daemon or without any repository specified, only relevant (to the SVN URL or path) repositories will be reported.


To find out where Git branch and path are mapped, specify refs/heads/branch or refs/heads/branch:relative/path. The output will be:

Output format
/path/to/repository
http://project/root/url
path/relative/to/project/root
<empty line>

If Git branch and path are not translated to SVN, there will be no output.


Finally, ther's a way to specify a file to read paths from a file: `--paths-file`. This is roughly an equivalent of running 'subgit map' for every line in that file.


For mapping authors specify `--author` option with SVN author or Git author. The output will have the following format:

Output format
/path/to/repository
svnAuthor
gitAuthor <email@domain.com>
<empty line>



  • No labels