2020-03-08 18:58:52 +00:00
[core]
autocrlf = input
editor = nvim
2020-03-31 20:32:43 +00:00
[submodule]
recurse = true
[rerere]
enabled = true
# Accelerate packing by automatically determining thread count
[pack]
threads = 0
2020-09-04 10:15:05 +00:00
[pull]
ff = only
[checkout]
defaultRemote = origin
2020-06-03 10:26:15 +00:00
[diff]
tool = nvim
[merge]
tool = nvim
[mergetool "nvim"]
cmd = nvim -f -c \"Gdiffsplit!\" \"$MERGED\"
prompt = false
[difftool "nvim"]
2020-11-14 01:05:51 +00:00
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
2020-06-03 10:26:15 +00:00
2020-03-31 20:32:43 +00:00
# Automatically push to branch with matching name
2020-03-08 18:58:52 +00:00
[push]
default = current
2020-03-31 20:32:43 +00:00
# Disable pagination for branch commmand by default
2020-03-08 18:58:52 +00:00
[pager]
branch = false
2020-03-31 20:32:43 +00:00
[grep]
2020-06-03 10:26:15 +00:00
lineNumber = 1
2020-03-31 20:32:43 +00:00
2020-03-08 18:58:52 +00:00
[color "status"]
added = green
changed = yellow
2020-03-31 20:32:43 +00:00
untracked = magenta
[user]
email = 27jf@pm.me
2020-06-03 10:26:15 +00:00
name = xerus2000
2020-03-31 20:32:43 +00:00
2020-09-04 10:15:05 +00:00
[mailmap]
file = /home/janek/.config/yadm/.mailmap
[http]
lowSpeedLimit = 1000
lowSpeedTime = 3
2020-03-08 18:58:52 +00:00
[alias]
2020-06-03 10:26:15 +00:00
st = status -sb
stv = --paginate status -v
2020-06-03 10:31:25 +00:00
stvv = --paginate status -vv
2020-06-03 10:26:15 +00:00
2020-10-12 20:15:35 +00:00
sta = stash
2020-10-29 10:40:43 +00:00
stl = stash list
2020-11-12 08:56:29 +00:00
sts = stash show -v
2020-10-12 20:15:35 +00:00
stp = stash pop
std = stash drop
2020-09-04 10:15:05 +00:00
r = remote -v
b = branch -vv
2020-12-07 20:55:25 +00:00
ba = b -a
2020-09-04 10:15:05 +00:00
ref = reflog
rev = rev-parse --short
head = rev-parse --short HEAD
2020-03-08 18:58:52 +00:00
root = rev-parse --show-toplevel
2020-11-14 01:05:51 +00:00
dir = rev-parse --git-dir
2020-09-04 10:15:05 +00:00
curbranch = symbolic-ref --short HEAD
2020-11-14 01:05:51 +00:00
2020-10-23 12:02:54 +00:00
f = fetch
fa = fetch --all
2020-11-12 08:56:29 +00:00
l = !git pull --rebase --autostash || (>&2 echo "Error - aborting rebase!" && git rebase --abort)
2020-10-23 12:02:54 +00:00
2020-11-14 01:05:51 +00:00
lg = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --graph
lo = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --no-merges
2020-11-12 08:56:29 +00:00
ln = !git --no-pager lo -5
2020-11-14 01:05:51 +00:00
my = lo --author [Jj]anek
standup = lo --since yesterday --author [Jj]anek --all
2020-09-04 10:15:05 +00:00
co-authors = !git log | grep -i Co-Authored | awk '!a[$0]++'
2020-10-12 20:15:35 +00:00
when = git for-each-ref --sort=committerdate --format='%(refname:short) * %(authorname) * %(committerdate:relative)' refs/remotes/ # List all branches with their last updates
2020-09-04 10:15:05 +00:00
2020-06-08 09:42:34 +00:00
dir = !git root | sed 's/$/\\/.git/' | grep --color=never "/" # grep ensures a proper exit status on fail
2020-11-12 08:56:29 +00:00
upstream = !git rev-parse --abbrev-ref --symbolic-full-name @{upstream} || git rev-parse --abbrev-ref --symbolic-full-name @{push} || echo origin/$(git curbranch)
sup = !git branch --set-upstream-to @{push}
2020-09-04 10:15:05 +00:00
2020-10-12 20:15:35 +00:00
a = add -u
aa = add -u .
2020-10-03 09:37:54 +00:00
ap = add -p
c = commit -v
2020-09-04 10:15:05 +00:00
co = checkout
2020-10-12 20:15:35 +00:00
cb = checkout -b
2020-09-04 10:15:05 +00:00
cp = cherry-pick
2020-10-12 20:15:35 +00:00
rb = rebase
rbc = rebase --continue
2020-09-04 10:15:05 +00:00
p = push
pf = push --force-with-lease
fs = !git fetch && git st
lu = !git pull upstream $(git curbranch)
luu = !git pull upstream $(git curbranch) && git push --no-verify
2020-11-14 01:05:51 +00:00
cap = git commit --all --amend --no-edit && git push --force-with-lease
2020-09-04 10:15:05 +00:00
rh = reset HEAD~
2020-10-12 20:15:35 +00:00
rs = reset --keep
2020-11-12 08:56:29 +00:00
ru = reset --keep @{upstream}
2020-09-04 10:15:05 +00:00
unstage = reset HEAD --
gcr = !git gc && git repack -a -d
2020-11-13 11:49:24 +00:00
ready = rebase -i @{push}
2020-09-04 10:15:05 +00:00
format-head = !git stash && git-clang-format HEAD~ && git commit -a --amend --no-edit && git stash pop
2020-09-19 07:34:47 +00:00
2020-11-12 08:56:29 +00:00
sm = submodule update --init --recursive
2020-09-04 10:15:05 +00:00
2020-11-26 19:38:26 +00:00
cme = commit -v --edit --message
2020-09-04 10:15:05 +00:00
# yadm
2020-11-26 19:38:26 +00:00
cgit = !yadm cme "config/git:" -- $XDG_CONFIG_HOME/git/config $CONFIG_SHELLS/git $HOME/.local/bin/git-*
cvim = !yadm cme "config/nvim:" -- $XDG_CONFIG_HOME/nvim/init*
cshell = !yadm cme "config/shell:" -- $CONFIG_SHELLS
cbin = !yadm cme "bin:" -- $HOME/.local/bin
# data
journal = !git cme "notes/journal:" -- $(git root)/2-standards/notes/journal
2020-12-07 20:55:25 +00:00
note = !git cme "notes:" -- $(git root)/2-standards/notes
2020-03-31 20:32:43 +00:00
2020-03-08 18:58:52 +00:00
[filter "lfs"]
2020-03-31 20:32:43 +00:00
clean = git-lfs clean -- %f
2020-03-08 18:58:52 +00:00
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
2020-06-03 10:26:15 +00:00
required = true