Before migration make sure you have installed Github client, Java development kit. You can download JDK from https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/ . Make sure your JAVA_HOME is also set under environment variables
Please follow the step by step guide mentioned below:
- Create a new folder and navigate to the folder. eg: C:\svnproject
- Now we need to extract the SVN project and history, thereafter clone the project for GitHub
- Open the command prompt and navigate to C:\svnproject
- Extract project and history from SVN and clone for GitHub by using the following syntax
git svn clone <SVN Path>
eg: git svn clone svn://svndomain/ApplicationPath - Once you execute the above command, it will prompt you to enter SVN username and password, if SVN is not already configured in your system.
- After entering your SVN credentials, it will extract the history from SVN and make a clone for GitHub. This step may take time depending upon the history size.
- Add the cloned project to the remote GitHub
- In the current directory, execute the following command to create a remote link with GitHub
C:\svnproject>git remote add origin https://github.com/repo-name
- In the current directory, execute the following command to create a remote link with GitHub
- Verify the GitHub remote configuration
- In the current directory, execute the following command to verify the remote link configuration is correct
C:\svnproject>git remote -v - If the configuration is correct, we will get the following output with the remote GitHub link
origin https://github.com/repo-name (fetch)
origin https://github.com/repo-name (push)
- In the current directory, execute the following command to verify the remote link configuration is correct
- Push the source to the GitHub repo
- In the current directory, execute the following command to push the source to GitHub repo, this may take time, based upon the size of the project
C:\svnproject>git push -u origin master
- In the current directory, execute the following command to push the source to GitHub repo, this may take time, based upon the size of the project
- That’s it, you successfully moved the SVN project with history to GitHub
Wow! This could be one particular of the most beneficial blogs We’ve ever arrive across on this subject. Actually Magnificent. I’m also a specialist in this topic so I can understand your effort. Margarette Salem Garneau
Some really great articles on this web site , thanks for contribution. Rose Dallis Dressel
This is one awesome post. Much thanks again. Awesome. Tabbitha Demetris Merritt
Great post. I am dealing with a few of these issues as well.. Jorie Garrott Puri
Warm to you thanks for your help.
Awesome article. Thanks for sharing, I was able to migrate