Improve pull-repos.ps1 and switch-branch.ps1

This commit is contained in:
Markus Fleschutz
2021-06-17 08:10:44 +02:00
parent f1de21d8fc
commit 882eaf4b29
2 changed files with 3 additions and 3 deletions

View File

@ -24,10 +24,10 @@ try {
& git fetch --all --recurse-submodules --jobs=4
if ($lastExitCode -ne "0") { throw "'git fetch -all --recurse-submodules' failed" }
& git switch "$BranchName"
& git checkout --recurse-submodules "$BranchName"
if ($lastExitCode -ne "0") { throw "'git switch $BranchName' failed" }
& git pull
& git pull --recurse-submodules
if ($lastExitCode -ne "0") { throw "'git pull' failed" }
& git submodule update --init --recursive