Skip to content

Instantly share code, notes, and snippets.

@casallas
Last active August 29, 2015 13:56
Show Gist options
  • Save casallas/8795437 to your computer and use it in GitHub Desktop.
Save casallas/8795437 to your computer and use it in GitHub Desktop.
Using svn2git
  1. Get authors:

svn log --quiet http://path/to/root/of/project | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/^ //' | sort | uniq

  1. Make an authors.txt file containing, e.g.,
author = Name LastName <[email protected]>
author2 = Name2 LastName2 <[email protected]>
  1. Make a directory to clone your svn repo
mkdir repo
cd repo
  1. Clone your repo using one of the flavors here: https://github.com/nirvdrum/svn2git#initial-conversion

remember to add --authors ../authors.txt at the end of the command, e.g.:

svn2git -v svn://path/to/root/of/project --trunk / --nobranches --notags --authors ../authors.txt

(Note that --trunk / --nobranches --notags replaces --rootistrunk which seems broken, see nirvdrum/svn2git#127)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment