Posted By

jmiller on 04/17/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ReedD19


Convert svn repository to git


 / Published in: Bash
 

First, create ~/Sites/git-users.txt to convert the svn usernames to git users: admin = Beanstalk admin@example.com jmiller = J Miller jmiller@example.com

  1. mkdir ~/Sites/repo_tmp
  2. cd ~/Sites/repo_tmp
  3. git-svn init https://svn.example.com/repo/trunk/ --no-metadata
  4. git config svn.authorsfile ~/Sites/git-users.txt
  5. git-svn fetch
  6. git-svn show-ignore > .gitignore
  7. git add .gitignore
  8. git commit -m "Convert svn ignored files to .gitignore"
  9. cd ~/Sites
  10. git clone repo_tmp repo

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jmiller on June 15, 2011

To get a list of all committers: svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" "}' | sort -u

[source: http://john.albin.net/git/convert-subversion-to-git]

You need to login to post a comment.