Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move SVN repository to Bitbucket

A step by step on how to move SVN repository to Bitbucket on linux.

I have some repositories in SVN that I would like to move to Bitbucket, if anyone know's how to do it via linux commands, I'd really appreciate it, so I can turn it into a script.

Thank you so much!

like image 244
Mike Shobes Avatar asked Sep 13 '25 12:09

Mike Shobes


1 Answers

You can use git svn clone command to migrate svn repo to git repo. Detail steps as below:

git svn clone <URL for svn repo>
# besides you can use --trunk, --branches and --tags etc for git svn clone command
# may be asked to enter SVN credentials

# after first creating the repo in bitbucket...
cd reponame
git remote add origin <bitbucket repo URL>
# you may also need to "git pull --allow-unrelated-histories" to merge you new local branch with the remote
# you may need to do a "git branch --set-upstream-to=origin/master"
# you may also need to another "git pull --allow-unrelated-histories" to merge you new local branch with the remote
git push origin --all
like image 94
Marina Liu Avatar answered Sep 15 '25 03:09

Marina Liu