Skip to content

Instantly share code, notes, and snippets.

View Gimly's full-sized avatar

Xavier Hahn Gimly

  • Rollomatic
  • Switzerland
View GitHub Profile
@Gimly
Gimly / Git-Import-SVN.ps1
Last active May 16, 2023 23:59
Import a SVN repository into a Git repository, complete with branches and tags. Script inspired by the method described by StackOverflow answer http://stackoverflow.com/a/3972103/123597
Param(
[Parameter(Mandatory=$true, Position=1)]
[string]$SvnFolderPath,
[Parameter(Mandatory=$true, Position=2)]
[string]$TargetFolder,
[Parameter(Mandatory=$true, Position=3)]
[string]$GitUrl
)
git svn clone --stdlayout --no-metadata -A users.txt $SvnFolderPath "$TargetFolder-tmp"