19 lines
405 B
PowerShell
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 |