Skip to content

Commit 9b6fb10

Browse files
committed
feat(aliases): adds gpr* aliases and ggpull
* Also fixes Get-Git-Aliases to blacklist new commands
1 parent 38e46ec commit 9b6fb10

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

src/aliases.ps1

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ function ggfl {
259259

260260
git push --force-with-lease origin $CurrentBranch
261261
}
262+
function ggpull {
263+
$CurrentBranch = Get-Git-CurrentBranch
264+
265+
git pull origin $CurrentBranch
266+
}
262267
function ggl {
263268
$CurrentBranch = Get-Git-CurrentBranch
264269

@@ -393,6 +398,35 @@ function gpod {
393398
function gpr {
394399
git pull --rebase $args
395400
}
401+
function gpra {
402+
git pull --rebase --autostash $args
403+
}
404+
function gprv {
405+
git pull --rebase -v $args
406+
}
407+
function gprav {
408+
git pull --rebase --autostash -v $args
409+
}
410+
function gprom {
411+
$MainBranch = Get-Git-MainBranch
412+
413+
git pull --rebase origin $MainBranch $args
414+
}
415+
function gpromi {
416+
$MainBranch = Get-Git-MainBranch
417+
418+
git pull --rebase=interactive origin $MainBranch $args
419+
}
420+
function gprum {
421+
$MainBranch = Get-Git-MainBranch
422+
423+
git pull --rebase upstream $MainBranch $args
424+
}
425+
function gprumi {
426+
$MainBranch = Get-Git-MainBranch
427+
428+
git pull --rebase=interactive upstream $MainBranch $args
429+
}
396430
function gpu {
397431
git push upstream $args
398432
}
@@ -591,23 +625,29 @@ function gunwip {
591625
git reset HEAD~1
592626
}
593627
function gup {
628+
# todo deprecate
594629
git pull --rebase $args
595630
}
596631
function gupa {
632+
# todo deprecate
597633
git pull --rebase --autostash $args
598634
}
599635
function gupv {
636+
# todo deprecate
600637
git pull --rebase -v $args
601638
}
602639
function gupav {
640+
# todo deprecate
603641
git pull --rebase --autostash --verbose $args
604642
}
605643
function gupom {
644+
# todo deprecate
606645
$MainBranch = Get-Git-MainBranch
607646

608647
git pull --rebase origin $MainBranch $args
609648
}
610649
function gupomi {
650+
# todo deprecate
611651
$MainBranch = Get-Git-MainBranch
612652

613653
git pull --rebase=interactive origin $MainBranch $args

src/git-aliases-plus.psm1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ $FunctionsToExport = @(
8282
'gga',
8383
'ggf',
8484
'ggfl',
85+
'ggpull',
8586
'ggl',
8687
'ggp',
8788
# 'ggpnp',
@@ -126,6 +127,13 @@ $FunctionsToExport = @(
126127
'gpoat',
127128
'gpod',
128129
'gpr',
130+
'gpra',
131+
'grpv',
132+
'gprav',
133+
'gprom',
134+
'gpromi',
135+
'gprum',
136+
'gprumi',
129137
'gpu',
130138
'gpv',
131139
'gr',

src/utils.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ function Get-Git-Aliases ([string] $Alias) {
8888
'Get-Git-CurrentBranch',
8989
'Remove-Alias',
9090
'Format-AliasDefinition',
91-
'Get-Git-Aliases'
91+
'Get-Git-Aliases',
92+
'Get-SemVer',
93+
'Get-GitSemVer'
9294
)
9395
$aliases = Get-Command -Module git-aliases | Where-Object { $_ -notin $blacklist }
9496

0 commit comments

Comments
 (0)