From 14b451ba15ebfdb11b7f59b5cc5e020e2ad507b4 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Sat, 16 Sep 2023 06:37:32 +0000 Subject: [PATCH] Fix removing of files before checking out --- Generate-GitBranches.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Generate-GitBranches.ps1 b/Generate-GitBranches.ps1 index 59065d2f..66e5d90b 100644 --- a/Generate-GitBranches.ps1 +++ b/Generate-GitBranches.ps1 @@ -64,7 +64,7 @@ try { } "Checking out files" | Write-Host -ForegroundColor Green - $masterTrackedFiles | Get-Item -Force | Remove-Item -Recurse -Force + Get-ChildItem . -Exclude '.git', 'build/Dockerfile', 'update/Dockerfile', 'build.sh', 'notify.sh', '.gitlab-ci.yml', '.env', '.state' -Force | Remove-Item -Recurse -Force git checkout master -- build if ($LASTEXITCODE) { throw } git checkout master -- update