mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-27 07:02:18 +01:00
Update new-branch.ps1
This commit is contained in:
parent
e821fc3912
commit
a924f76a99
@ -1,6 +1,6 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Create a new Git branch
|
Creates a new Git branch
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script creates and switches to a new branch in a Git repository.
|
This PowerShell script creates and switches to a new branch in a Git repository.
|
||||||
.PARAMETER NewBranchName
|
.PARAMETER NewBranchName
|
||||||
@ -49,7 +49,7 @@ try {
|
|||||||
|
|
||||||
$RepoDirName = (get-item "$RepoDir").Name
|
$RepoDirName = (get-item "$RepoDir").Name
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ new '$NewBranchName' branch created in 📂$RepoDirName repo based on '$CurrentBranchName' branch in $Elapsed sec"
|
"✔️ new '$NewBranchName' branch created in 📂$RepoDirName repo in $Elapsed sec (based on '$CurrentBranchName' branch)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user