Skip to content

Instantly share code, notes, and snippets.

@tonit
Created January 7, 2011 12:55
Show Gist options
  • Save tonit/769425 to your computer and use it in GitHub Desktop.
Save tonit/769425 to your computer and use it in GitHub Desktop.
Run this inside svn checkout to create a authors template for git svn clone
#!/usr/bin/env bash
# From http://technicalpickles.com/posts/creating-a-svn-authorsfile-when-migrating-from-subversion-to-git/
authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq)
for author in ${authors}; do
echo "${author} = NAME <USER@DOMAIN>";
done
echo "# Now run git svn --authors-file=path/to/authors_file clone SVN_REPO_URL LOCAL_DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment