Add --prune to switch-branch.ps1

This commit is contained in:
Markus Fleschutz 2021-06-17 08:27:20 +02:00
parent 882eaf4b29
commit f8825b0430

View File

@ -21,8 +21,8 @@ try {
if ("$Result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $Result" }
"🢃 Fetching updates..."
& git fetch --all --recurse-submodules --jobs=4
if ($lastExitCode -ne "0") { throw "'git fetch -all --recurse-submodules' failed" }
& git fetch --all --recurse-submodules --prune --prune-tags
if ($lastExitCode -ne "0") { throw "'git fetch' failed" }
& git checkout --recurse-submodules "$BranchName"
if ($lastExitCode -ne "0") { throw "'git switch $BranchName' failed" }