Convert svn repository to git


/ Published in: Bash
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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

You need to login to post a comment.