mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-12 17:08:23 +01:00
Improved switch-branch.ps1
This commit is contained in:
parent
45abf86a17
commit
108f3ad743
@ -20,6 +20,10 @@ try {
|
||||
$Branch = read-host "Enter branch name to switch to"
|
||||
}
|
||||
& git switch --recurse-submodules $Branch
|
||||
if ($lastExitCode -ne "0") {
|
||||
throw "'git switch --recurse-submodules $Branch' failed"
|
||||
}
|
||||
& git status
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user