Update new-branch.ps1

This commit is contained in:
Markus Fleschutz 2023-08-29 17:22:53 +02:00
parent 4de252f33f
commit 8a1935170f

View File

@ -8,7 +8,7 @@
.PARAMETER repoPath .PARAMETER repoPath
Specifies the path to the Git repository (current working directory per default) Specifies the path to the Git repository (current working directory per default)
.EXAMPLE .EXAMPLE
PS> ./new-branch.ps1 test123 PS> ./new-branch.ps1 test123 C:\MyRepo
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES
@ -50,7 +50,7 @@ try {
if ($lastExitCode -ne "0") { throw "'git submodule update' failed with exit code $lastExitCode" } if ($lastExitCode -ne "0") { throw "'git submodule update' failed with exit code $lastExitCode" }
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds [int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✔️ created branch '$newBranch' based on '$currentBranch' in repo 📂$repoPathName in $elapsed sec" "✔️ Creating branch '$newBranch' in repo 📂$repoPathName (based on '$currentBranch') took $elapsed sec"
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"