Skip to content

Instantly share code, notes, and snippets.

@rohityadavcloud
Created April 22, 2013 07:35
Show Gist options
  • Save rohityadavcloud/9072b1250b7d2207bb5c to your computer and use it in GitHub Desktop.
Save rohityadavcloud/9072b1250b7d2207bb5c to your computer and use it in GitHub Desktop.
Convert svn repo to git
- Get authors file:
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
- Fix the authors file with alias = Name <[email protected]>
- Convert!
mkdir repo && cd repo
git svn init repo --no-metadata
git config svn.authorsfile <path to authors file>
git svn fetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment