Code Snippet

Just another Code Snippet site

SVN to Git Migration

Create an author mapping file like :

svn_username = git_username <git_user_email>

Import the SVN repo in a new empty folder

git svn --authors-file=author_file_name clone https://svn.com/repo_name new_repo_folder

Update Commit message to remove “git-svn-id”

git filter-branch --msg-filter '
        sed -e "/git-svn-id:/d"
'

Create a new Git repo.

Add new origin to local repo and push to master

git remote add origin https://git.com/new_repo_name.git
git push -u origin master

,


Leave a Reply

Your email address will not be published. Required fields are marked *