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:
- Download GIT-TF from the following URL git-tf.zip
- Extract the download file and navigate to the extracted folder. eg: C:\git-tf
- 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 clonehttp://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.
- Create a new repository in Github
- 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
- Open the command prompt and navigate output source folder eg: C:\MyEFFramework and execute the following command to create a remote link with GitHub
- 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)
- In the output source folder execute the following command to verify the remote link configuration is correct
- 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
- 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
- That’s it, you successfully moved the TFS project with history to GitHub
I consider something truly interesting about your site so I bookmarked . Ursa Amble Sidras
Really enjoyed this article post. Really thank you! Much obliged. Larissa Paten Agueda
Thank you for some other informative blog. Ondrea Yurik Steinway