Migrate from SVN to Github Source control

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:

  1. Create a new folder and navigate to the folder. eg: C:\svnproject
  2. 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.

     

  3. 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
  4. 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)
  5. 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
  6. That’s it, you successfully moved the SVN project with history to GitHub

Migrate from TFS to Github Source control

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:

  1. Download GIT-TF from the following URL git-tf.zip
  2. Extract the download file and navigate to the extracted folder. eg: C:\git-tf
  3. Now we need to extract the TFS project and history, thereafter clone the project for GitHub 
    • Open the command prompt and navigate to C:\git-tf
    • Extract project and history from TFS and clone for GitHub by using the following syntax

      git-tf clone <TFS Project Collection> <TFS Project Name> <Output Source> --deep
      eg: git-tf clone 
      http://tfs.comapanyname.com:8080/tfs/DefaultCollection $/Project/ C:\ProjectDirectory --deep
    • Once you execute the above command, it will prompt you to enter TFS username and password. 
    • After entering your TFS credentials, GIT-TF will extract the history from TFS and make a clone for GitHub. This step may take time depending upon the history size. 
  4. Create a new repository in Github
  5. Add the cloned project to the remote GitHub
    • Open the command prompt and navigate output source folder eg: C:\MyEFFramework and execute the following command to create a remote link with GitHub
      C:\ProjectDirectory>git remote add origin https://github.com/reponame
  6. Verify the GitHub remote configuration
    • In the output source folder execute the following command to verify the remote link configuration is correct
      C:\ProjectDirectory>git remote -v
    • If the configuration is correct, we will get the following output with the remote GitHub link
      origin https://github.com/reponame (fetch)
      origin https://github.com/reponame (push)
  7. Push the source to the GitHub repo
    • In the output source folder execute the following command to push the source to GitHub repo, this may take time, based upon the size of the project
      C:\ProjectDirectory>git push -u origin master
  8. That’s it, you successfully moved the TFS project with history to GitHub