Recently I tried to migrate our repository from SVN to GitHub with the historical commits, but after some research, I didn’t find clear steps to do this, so share this information for users who have the same case as me.
Step 1: Make sure you have the latest git installed, this will allow you to run command git svn
in below.
Step 2: Run the below command to clone the source code from SVN
git svn clone <your HTTP protocal SVN URL> -s
Step 3: Create a new repository on GitHub and run the below commands in order under the root folder of source code with the new GitHub web URL:
git remote add origin <GITHUB_REPOSITORY_URL>
git branch -M main
git push -u origin main