File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -260,10 +260,19 @@ function gpoat {
260
260
git push origin -- all
261
261
git push origin -- tags
262
262
}
263
+ function gpr {
264
+ git pull -- rebase $args
265
+ }
266
+ function gpra {
267
+ git pull -- rebase -- autostash $args
268
+ }
263
269
function gpristine {
264
270
git reset -- hard
265
271
git clean - dfx
266
272
}
273
+ function gprv {
274
+ git pull -- rebase - v $args
275
+ }
267
276
function gpu {
268
277
git push upstream $args
269
278
}
@@ -402,12 +411,15 @@ function gunwip {
402
411
git reset HEAD~1
403
412
}
404
413
function gup {
414
+ Write-Host - Deprecated " gup" " gpr"
405
415
git pull -- rebase $args
406
416
}
407
417
function gupa {
418
+ Write-Host - Deprecated " gupa" " gpra"
408
419
git pull -- rebase -- autostash $args
409
420
}
410
421
function gupv {
422
+ Write-Host - Deprecated " gupv" " gprv"
411
423
git pull -- rebase - v $args
412
424
}
413
425
function glum {
Original file line number Diff line number Diff line change @@ -80,7 +80,10 @@ $FunctionsToExport = @(
80
80
' gpf' ,
81
81
' gpf!' ,
82
82
' gpoat' ,
83
+ ' gpr' ,
84
+ ' gpra' ,
83
85
' gpristine' ,
86
+ ' gprv' ,
84
87
' gpu' ,
85
88
' gpv' ,
86
89
' gr' ,
Original file line number Diff line number Diff line change @@ -133,3 +133,26 @@ function Get-Git-Aliases ([string] $Alias) {
133
133
134
134
return Format-Table - InputObject $aliases - AutoSize - Wrap - Property $cols
135
135
}
136
+
137
+ <#
138
+ . SYNOPSIS
139
+ Print deprecated message.
140
+ . DESCRIPTION
141
+ Print a colored message telling that a specific alias ($previous)
142
+ is deprecated, suggesting the use of another alias ($next).
143
+ . EXAMPLE
144
+ PS C:\> Write-Host-Deprecated "gup" "gpr"
145
+ [git-aliases] gup is a deprecated alias, use "gpr" instead.
146
+ #>
147
+ function Write-Host-Deprecated {
148
+ param (
149
+ [Parameter (Mandatory = $true )][string ] $previous ,
150
+ [Parameter (Mandatory = $true )][string ] $next
151
+ )
152
+
153
+ Write-Host " [git-aliases] " - ForegroundColor Yellow - NoNewLine
154
+ Write-Host " ${previous} " - ForegroundColor Red - NoNewLine
155
+ Write-Host " is a deprecated alias, use " - ForegroundColor Yellow - NoNewLine
156
+ Write-Host " "" ${next} "" " - ForegroundColor Green - NoNewLine
157
+ Write-Host " instead.`n " - ForegroundColor Yellow
158
+ }
You can’t perform that action at this time.
0 commit comments