ps/Modules/Cole.PowerShell.Developer/TODO/Push-GitBranch.ps1
2023-05-30 22:51:22 -07:00

19 lines
405 B
PowerShell

function Push-GitBranch {
[CmdletBinding()]
param (
)
$lines = Invoke-GitCommand -Verb Push
foreach ($line in $lines) {
if ($line.StartsWith("remote:")) {
if ($line.Substring(8).Trim().StartsWith("https://")) {
$line.Substring(8).Trim() | Set-Clipboard
}
}
}
return $lines
}
Set-Alias -Name push -Value Push-GitBranch