mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-27 12:18:43 +02:00
Improve create-branch.ps1
This commit is contained in:
parent
2041a385fa
commit
506e9b334d
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/pwsh
|
#!/usr/bin/pwsh
|
||||||
<#
|
<#
|
||||||
.SYNTAX create-branch.ps1 [<new-branch-name>] [<repo-dir>]
|
.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
|
.LINK https://github.com/fleschutz/PowerShell
|
||||||
.NOTES Author: Markus Fleschutz / License: CC0
|
.NOTES Author: Markus Fleschutz / License: CC0
|
||||||
#>
|
#>
|
||||||
@ -32,7 +32,7 @@ try {
|
|||||||
& git submodule update --init --recursive
|
& git submodule update --init --recursive
|
||||||
if ($lastExitCode -ne "0") { throw "'git submodule update' failed" }
|
if ($lastExitCode -ne "0") { throw "'git submodule update' failed" }
|
||||||
|
|
||||||
"🌵 branch $NewBranchName has been created"
|
"✔️ created new branch 🌵$NewBranchName"
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user