From cb93ce17088c30f90a627f08fabbfd5b47a0c254 Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Wed, 28 Sep 2022 16:42:56 +0000 Subject: [PATCH] git aliases --- git/.gitconfig | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/git/.gitconfig b/git/.gitconfig index c58f55a..c8bcd55 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -10,3 +10,27 @@ insteadOf = https://github.com/ [alias] gr = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all + # one-line log + l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short + + a = add + ap = add -p + c = commit --verbose + ca = commit -a --verbose + cm = commit -m + cam = commit -a -m + m = commit --amend --verbose + + d = diff + ds = diff --stat + dc = diff --cached + + s = status -s + st = status -s + co = checkout + cob = checkout -b + # list branches sorted by last modified + b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" + + # list aliases + la = "!git config -l | grep alias | cut -c 7-"