Improve create-branch.ps1

This commit is contained in:
Markus Fleschutz 2021-04-21 08:57:08 +02:00
parent 2041a385fa
commit 506e9b334d

View File

@ -1,7 +1,7 @@
#!/usr/bin/pwsh
<#
.SYNTAX create-branch.ps1 [<new-branch-name>] [<repo-dir>]
.DESCRIPTION creates a new branch in the current/given Git repository
.DESCRIPTION creates and switches to a new branch in a Git repository
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
@ -32,7 +32,7 @@ try {
& git submodule update --init --recursive
if ($lastExitCode -ne "0") { throw "'git submodule update' failed" }
"🌵 branch $NewBranchName has been created"
"✔️ created new branch 🌵$NewBranchName"
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"