From 673779a2b9099f5dcdb3375fbdb22f5604cbc910 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 17 Mar 2021 10:45:19 +0100 Subject: [PATCH] Add git fetch --- Scripts/switch-branch.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Scripts/switch-branch.ps1 b/Scripts/switch-branch.ps1 index f4f55052..cbd675ed 100755 --- a/Scripts/switch-branch.ps1 +++ b/Scripts/switch-branch.ps1 @@ -23,6 +23,9 @@ try { if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" } set-location "$RepoDir" + & git fetch --all --recurse-submodules + if ($lastExitCode -ne "0") { throw "'git fetch --all --recurse-submodules' failed" } + & git switch --recurse-submodules $Branch if ($lastExitCode -ne "0") { throw "'git switch --recurse-submodules $Branch' failed" }