From 46b7a1819af69c235edee23635cb1e2aca12bbfb Mon Sep 17 00:00:00 2001 From: srdusr Date: Sun, 5 Nov 2023 13:00:17 +0200 Subject: Add bunch of aliases --- .gitconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitconfig b/.gitconfig index a5555dc..e518a0e 100644 --- a/.gitconfig +++ b/.gitconfig @@ -4,6 +4,14 @@ [init] defaultBranch = main [alias] + graph = log --oneline --graph --decorate + ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate + ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat + lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short + conflicts = diff --name-only --diff-filter=U + local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }' + recent-branches = !git branch --sort=-committerdate | head + authors = !git log --format='%aN <%aE>' | grep -v 'users.noreply.github.com' | sort -u --ignore-case sba ="!f() { git subtree add --prefix $2 $1 main; }; f" sbu ="!f() { git subtree pull --prefix $2 $1 main; }; f" stashrebase = "!f() { if [ \"$(git symbolic-ref --short HEAD)\" = \"main\" ]; then git stash save && git fetch && git rebase origin main && git stash apply; else git stash save && git fetch && git rebase origin master && git stash apply; fi; }; f" -- cgit v1.2.3