Skip to content

Commit 2f8620c

Browse files
author
Markus Fleschutz
committed
Update clean-repo.ps1 and switch-branch.ps1
1 parent ac4df78 commit 2f8620c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Scripts/clean-repo.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ try {
2727
"⏳ Step 2/4 - Checking folder 📂$RepoDirName..."
2828
if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder '$RepoDir' - maybe a typo or missing folder permissions?" }
2929

30-
"⏳ Step 3/4 - Cleaning Git repository..."
30+
"⏳ Step 3/4 - Cleaning Git repository from untracked files..."
3131
& git -C "$RepoDir" clean -xfd -f # to delete all untracked files in the main repo
3232
if ($lastExitCode -ne "0") {
3333
"'git clean' failed with exit code $lastExitCode, retrying once..."
3434
& git -C "$RepoDir" clean -xfd -f
3535
if ($lastExitCode -ne "0") { throw "'git clean' failed with exit code $lastExitCode" }
3636
}
3737

38-
"⏳ Step 4/4 - Cleaning Git submodules..."
38+
"⏳ Step 4/4 - Cleaning Git submodules from untracked files..."
3939
& git -C "$RepoDir" submodule foreach --recursive git clean -xfd -f # to delete all untracked files in the submodules
4040
if ($lastExitCode -ne "0") { throw "'git clean' in the submodules failed with exit code $lastExitCode" }
4141

4242
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
43-
"✔️ cleaned Git repo 📂$RepoDirName in $Elapsed sec"
43+
"✔️ cleaned 📂$RepoDirName repo in $Elapsed sec"
4444
exit 0 # success
4545
} catch {
4646
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

Scripts/switch-branch.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ try {
2929

3030
$RepoDir = Resolve-Path "$RepoDir"
3131
$RepoDirName = (Get-Item "$RepoDir").Name
32-
"⏳ Step 2/6 - Checking Git repository 📂$RepoDirName..."
32+
"⏳ Step 2/6 - Checking folder 📂$RepoDirName..."
3333
if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
3434

3535
$Result = (git status)

0 commit comments

Comments
 (0)