mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-20 17:08:19 +02:00
Add --prune to switch-branch.ps1
This commit is contained in:
parent
882eaf4b29
commit
f8825b0430
@ -21,8 +21,8 @@ try {
|
|||||||
if ("$Result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $Result" }
|
if ("$Result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $Result" }
|
||||||
|
|
||||||
"🢃 Fetching updates..."
|
"🢃 Fetching updates..."
|
||||||
& git fetch --all --recurse-submodules --jobs=4
|
& git fetch --all --recurse-submodules --prune --prune-tags
|
||||||
if ($lastExitCode -ne "0") { throw "'git fetch -all --recurse-submodules' failed" }
|
if ($lastExitCode -ne "0") { throw "'git fetch' failed" }
|
||||||
|
|
||||||
& git checkout --recurse-submodules "$BranchName"
|
& git checkout --recurse-submodules "$BranchName"
|
||||||
if ($lastExitCode -ne "0") { throw "'git switch $BranchName' failed" }
|
if ($lastExitCode -ne "0") { throw "'git switch $BranchName' failed" }
|
||||||
|
Loading…
Reference in New Issue
Block a user