From e11e7de3037a135bc6be08ac4f76f5f052353617 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Thu, 25 Feb 2021 12:25:34 +0100 Subject: [PATCH] config/git: create util aliases for default branches --- .config/git/config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/git/config b/.config/git/config index 0904556..31f42a3 100644 --- a/.config/git/config +++ b/.config/git/config @@ -73,10 +73,11 @@ r = remote -v b = branch -vv ba = b -a - + main = !cat $(git rev-parse --git-dir)/refs/remotes/origin/HEAD | cut -d'/' -f4 s = switch sc = switch -c + sm = !git switch $(git main) ref = reflog show --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' rev = rev-parse --short @@ -110,6 +111,7 @@ cp = cherry-pick rb = rebase + rbm = !git rebase $(git main) rbc = rebase --continue sta = stash @@ -132,7 +134,7 @@ lu = !git pull --rebase upstream ${1:-$(git curbranch)} rg = rmgonebranches - sm = submodule update --init --recursive + su = submodule update --init --recursive gcr = !git gc && git repack -a -d # Change remote