Skip to content

Instantly share code, notes, and snippets.

@abiriadev
Last active May 24, 2023 16:57
Show Gist options
  • Save abiriadev/230d3c32fbf18e6c15432dd22f2ef097 to your computer and use it in GitHub Desktop.
Save abiriadev/230d3c32fbf18e6c15432dd22f2ef097 to your computer and use it in GitHub Desktop.
my git configuration file located at ~/.gitconfig :)
[user]
email = [email protected]
name = Abiria
signingKey = [email protected]
[pager]
diff = delta
log = delta
reflog = delta
show = delta
branch = false
[color]
ui = always
; [color "decorate"]
; HEAD = bold blink italic 196
; branch = 214
; tag = bold 222
[interactive]
diffFilter = delta --color-only --features=interactive
[delta]
features = decorations
line-numbers = true
#side-by-side = true
[delta "interactive"]
keep-plus-minus-markers = false
[delta "decorations"]
commit-decoration-style = blue ol
commit-style = raw
file-style = omit
hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = "#067a00"
hunk-header-style = file line-number syntax
[core]
editor = nvim
pager = less
autocrlf = input
[alias]
bi = bisect
bl = blame
blh = blame HEAD
dfs = diff --cached
e = status --short
et = status --short -uall
eT = status --short -uall
ee = status --short .
next = checkout HEAD@{1}
prev = checkout HEAD~1
h = help
a = add
aa = add --all
ad = add
br = branch -v
cam = commit -am
cfg = config
cfgg = config --global
ch = checkout
chp = cherry-pick
ck = checkout
cl = clone
cm = commit -v
co = commit -v
com = commit -v -m
coed = commit --amend
cp = cherry-pick
df = diff
dt = difftool -y --dir-diff
fch = fetch
fh = fetch
fl = flow
f = flow
in = init
l = log
l1 = log -n 1
la = log --all
last = log -n 1
ll = log --oneline --graph
lla = log --oneline --graph --all
lg1 = lg1-specific --all
lg2 = lg2-specific --all
lg3 = lg3-specific --all
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
lg2-specific = 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(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = 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 cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
lg = log --graph --pretty=format:'%Cred%h%Creset %ad %s %C(yellow)%d%Creset %C(bold blue)<%an>%Creset' --date=short
hist = log --graph --full-history --all --pretty=format:'%Cred%h%Creset %ad %s %C(yellow)%d%Creset %C(bold blue)<%an>%Creset' --date=short
mg = merge
mt = mergetool
pu = push
ph = push
pho = push origin
pl = pull
pll = pull --rebase
po = push origin
rb = rebase
rbi = rebase --interactive
re = reset
ro = remote add origin
rt = remote
rto = remote add origin
sa = stash
ss = status --short
sr = status --short -uall
st = status
str = status -uall
unstage = restore --staged
wtc = !git commit -m \"$(curl -s whatthecommit.com/index.txt)\"
cont = rebase --continue
ckm = checkout main
am = commit --am
tmp = !git add -A && git commit -nm \"tmp: \"
undo = reset HEAD~1
count-log = log --all --graph --pretty=format:' '
tably-log = log --all --graph --decorate=short --color --pretty=format:'+%C(bold 214)%<(7,trunc)%h%C(reset)+%C(dim white)%>(12,trunc)%cr%C(reset)+%C(auto)%>(15,trunc)%D%C(reset)+%C(white)%s%C(reset)'
tably = !bash -c '" \
while IFS=+ read -r graph;do \
chars_count=$(sed -nl1000 \"l\" <<< \"$graph\" | grep -Eo \"\\\\\\\\\\\\\\\\|\\||\\/|\\ |\\*|_\" | wc -l); \
[[ $chars_count -gt ${max_chars:-0} ]] && max_chars=$chars_count; \
done < <(git count-log && echo); \
while IFS=+ read -r graph hash time branch message;do \
chars=$(sed -nl1000 \"l\" <<< \"$graph\" | grep -Eo \"\\\\\\\\\\\\\\\\|\\||\\/|\\ |\\*|_\" | wc -l); \
whitespaces=$(($max_chars-$chars)); \
whitespaces=$(seq -s\" \" $whitespaces|tr -d \"[:digit:]\"); \
graph_all=\"$graph_all$graph$whitespaces\n\"; \
hash_all=\"$hash_all$(printf \"%7s\" \"$hash\") \n\"; \
time_all=\"$time_all$(printf \"%12s\" \"$time\") \n\"; \
branch_all=\"$branch_all$(printf \"%15s\" \"$branch\")\n\"; \
message_all=\"$message_all$message\n\"; \
done < <(git tably-log && echo); \
paste -d\" \" <(echo -e \"$time_all\") <(echo -e \"$branch_all\") <(echo -e \"$graph_all\") \
<(echo -e \"$hash_all\") <(echo -e \"$message_all\"); \
'"
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[credential]
helper = store
[gpg]
program = gpg
[commit]
gpgSign = false
[tag]
forceSignAnnotated = false
[rerere]
enabled = true
[init]
defaultBranch = "main"
[help]
autocorrect = 1
[merge]
tool = idea
[mergetool "idea"]
cmd = idea merge $LOCAL $REMOTE $BASE $MERGED
trustExitCode = true
[diff]
tool = idea
[difftool "idea"]
cmd = idea diff $LOCAL $REMOTE
[safe]
directory = /opt/flutter
directory = /home/abiria/mnt/win11/tmp/m22t-unity
directory = /home/abiria/mnt/win11/tmp/ws
[portocol "file"]
allow = always
[gitflow "branch"]
master = main
[gitflow "prefix"]
versiontag = v
[blame]
date = human
coloring = highlightRecent
coloring = repeatedLines
[color "blame"]
highlightRecent = 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment