Skip to content

Instantly share code, notes, and snippets.

View baywet's full-sized avatar
🏬
Working from home

Vincent Biret baywet

🏬
Working from home
View GitHub Profile
@baywet
baywet / gittfsmigrationcleanup.ps1
Last active April 21, 2024 21:11
small powershell script which allows you to quickly clean your repo during the migration
param([string]$targetPath)
$targetSearchPath = $targetPath+"\*"
remove-item $targetSearchPath -Recurse -include *.vspscc,*.vssscc -Verbose
$slnRegexPattern = 'GlobalSection\(TeamFoundationVersionControl\)[:\w\d\s\\.=\/{}-]*EndGlobalSection'
$slnFiles = get-childitem -Path $targetSearchPath -Recurse -Filter *.sln
foreach($slnFile in $slnFiles)
{
$content = get-content $slnFile.FullName -Raw
if($content -match $slnRegexPattern)
{