Automates some of the process described here.
-
Copy the PowerShell scripts into a new folder.
-
Open PowerShell command window and change to the directory created in the previous step.
-
Create a variable containing the URL of the SVN repository. (This just saves you from needing to retype it multiple times.)
[uri]$url = "http://example.com/svn/OIT/GIS/myrepo/trunk"
-
Run the
Get-SvnUsers.ps1
script.\Get-SvnUsers.ps1 $url "email.example.com" | out-file -encoding ascii users.txt
-
Edit the user names and email addresses for accuracy. Only edit text to the right of the equals signs. Note the same user name with different casing may appear in the list. You must leave these duplicate entries in the list but should give them both the same name and email address.
PubliJo = PubliJo <PubliJo@email.example.com> publijo = publijo <publijo@email.example.com>
PubliJo = John Q. Public <john.q.public@email.example.com> publijo = John Q. Public <john.q.public@email.example.com>
-
Run the
Clone-SvnToGit.ps1
script.\Clone-SvnToGit.ps1 $url users.txt
This will clone the SVN repository into a new Git repository folder. This process will take several minutes.
-
Examine the Git repository folder to make sure the expected code files are present.
-
Move the new Git repository folder to a new location (optional).
-
Create a new, empty repository on remote server (e.g., TFS or GitHub). Do not have the server auto-generate any files such as
.gitignore
orREADME.md
. -
Set the Git repository on your computer to use the remote repository
git remote add origin http://git.example.com/my-reopsitory
-
Push to the remote repository
git push --mirror
or
git push origin --all git push origin --tags