Compare commits

..

2 Commits

Author SHA1 Message Date
Stefan Gaiselmann
2f21f8a1db Added 'bat' alias and minor changes in os detection for deb functions. 2022-01-28 09:18:30 +01:00
Stefan Gaiselmann
47248a43c8 Added Jess Archer's aliases to gitconfig. 2022-01-28 09:17:11 +01:00
3 changed files with 43 additions and 1 deletions

View File

@ -82,3 +82,6 @@ alias quota='quota -gls'
if [ -x /usr/bin/batcat ]; then
alias cat='batcat'
fi
if [ -x /usr/bin/bat ]; then
alias cat='bat'
fi

View File

@ -113,7 +113,7 @@ list-ssh-keys() {
done
}
{{- if (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "linuxmint") (eq .chezmoi.osRelease.id "ubuntu")) }}
{{- if (eq .chezmoi.os "linux") }}
# Show version of a Debian package
debversion() {
local pkgname="${1:?packagename required}"

View File

@ -9,11 +9,44 @@
logshort = log --pretty=format:'%Cred%h %Cgreen[%cd]%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --date=short
showfull = show --format=fuller --name-only
# Some aliases inspired by https://github.com/jessarcher
a = add
aa = add --all
ap = add --patch
au = add --update
b = branch
ba = branch --all
bd = branch --delete
bD = branch --delete --force
bm = branch --move
bM = branch --move --force
c = commit
# ca = commit --amend
# I use --all more often than amend
ca = commit --all
ci = commit --interactive
cm = commit --message
cv = commit --verbose
# from https://dzone.com/articles/lesser-known-git-commands
commend = commit --amend --no-edit
d = diff
dc = diff --cached
ds = diff --staged
dw = diff --word-diff
stl = stash list --date=local
st = stash
stp = stash pop
# more aliases from https://stackoverflow.com/questions/2553786/how-do-i-alias-commands-in-git
bv = branch -a -vv
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]%Creset%Cgreen\\ (%cd)" --decorate --numstat --date=relative
ld = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
lstat = log --name-status
# Short summary of commiters
summary = shortlog --summary --numbered --email
@ -36,6 +69,7 @@
# show stats
stat = show --stat --format=fuller
sname = show --name-status
# from https://dzone.com/articles/lesser-known-git-commands
commend = commit --amend --no-edit
@ -95,3 +129,8 @@
[http]
# proxy = http://host:port
#
[init]
# Talisman Test
# templatedir = 'c:/cygwin64/home/sgaiselm/.git-template'