From 967fdabe3008d0d70264b8dbf4c4758b6d521d7e Mon Sep 17 00:00:00 2001 From: zsehanovic <103604204+zsehanovic@users.noreply.github.com> Date: Thu, 11 May 2023 22:22:41 +0200 Subject: [PATCH] fix git aliases (#485) * fix git aliases * Update nu_alias_git.nu semi-colons are not required --------- Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com> --- aliases/git/nu_alias_git.nu | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/aliases/git/nu_alias_git.nu b/aliases/git/nu_alias_git.nu index 838f612..fb75886 100644 --- a/aliases/git/nu_alias_git.nu +++ b/aliases/git/nu_alias_git.nu @@ -55,7 +55,12 @@ export alias gcf = git config --list export alias gcl = git clone --recurse-submodules export alias gclean = git clean -id -export alias gpristine = ((git reset --hard); (git clean -dffx)) + +export def gpristine [] { + git reset --hard + git clean -dffx +} + export alias gcm = git checkout (git_main_branch) export alias gcmsg = git commit -m export alias gco = git checkout @@ -111,7 +116,10 @@ export alias gpd = git push --dry-run export alias gpf = git push --force-with-lease export alias gpf! = git push --force export alias gpl = git pull -export alias gpoat = (git push origin --all; git push origin --tags) +export def gpoat [] { + git push origin --all + git push origin --tags +} export alias gpr = git pull --rebase export alias gpu = git push upstream export alias gpv = git push -v @@ -142,7 +150,7 @@ export alias grs = git restore export alias grset = git remote set-url export alias grss = git restore --source export alias grst = git restore --staged -export alias grt = cd (git rev-parse --show-toplevel || echo .) +export alias grt = cd (git rev-parse --show-toplevel or echo .) export alias gru = git reset -- export alias grup = git remote update export alias grv = git remote -v @@ -169,9 +177,11 @@ export alias gsw = git switch export alias gswc = git switch -c export alias gts = git tag -s -export alias gtv = (git tag | lines | sort) -export alias glum = git pull upstream (git_main_branch) +export def gtv [] { + git tag | lines | sort +} +export alias glum = git pull upstream (git_main_branch) export alias gunignore = git update-index --no-assume-unchanged export alias gup = git pull --rebase export alias gupv = git pull --rebase -v