...
(Please note If you have Chocolatey already installed, you can jump to step 4)
1. Open CMD Windows PowerShell as administrator
2. run following in cmd shell to install Chocolatey package manager
Code Block |
---|
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" |
3. run following in cmd shell to test Chocolatey installation
...
6. run following in cmd shell to verify git-tfs installation.
Code Block |
---|
git tfs help |
Warning |
---|
If you don't have any installation from Visual Studio, you might get an error when running the above command I downloaded Team Explorer based on this website: https://devblogs.microsoft.com/devops/reintroducing-the-team-explorer-standalone-installer/ and I installed it.
After that, I choose the option "Not now, maybe later." and "Start Visual Studio"
NOTE: You don't need to leave the visual studio open. |
7. run following command if want to list all TFS branches that could be cloned (Please be careful to use this command as it might take long time. Also be sure to replace appropriately with your TFS collection information)
...
Code Block |
---|
git tfs clone http://tfsprod:8080/tfs/Marine%20Safety/ $/MPDIS-SDDPM_Scrum/DEVELOPMENT/MPDIS-SDDPM c:\tmp\migration\mpdis --branches=all |
Tip |
---|
If your branch happens to have spaces in the name, put quotes ("") around it. Eg. git tfs clone http://tfsprod:8080/tfs/Marine%20Safety/ "$/Some branch name with spaces in it/DEVELOPMENT/MPDIS-SDDPM" c:\tmp\migration\mpdis --branches=all |
Warning |
---|
If your codebase in TFS has sensitive information (eg. passwords), do not include them in your Azure Devops repository. You can do one of two things:
NOTE: If there is a space in a folder name in path-to-the-file, place a slash"\" before the space. E.g. if the path is My Project/Settings.settings, change it to My\ Project/Settings.settings. Otherwise, the above command does not remove specified file. |
10. Check Now navigate to the location where you cloned your repository (eg. c:\tmp\migration\mpdis). Then you can check history:
Code Block |
---|
git log |
...