dotfiles/.config/git/config

118 lines
2.7 KiB
Plaintext
Raw Normal View History

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
[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"]
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
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
[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
sta = stash
stp = stash pop
std = stash drop
r = remote -v
b = branch -vv
ref = reflog
rev = rev-parse --short
head = rev-parse --short HEAD
2020-03-08 18:58:52 +00:00
root = rev-parse --show-toplevel
curbranch = symbolic-ref --short HEAD
l = pull
lg = log --pretty=tformat:'%C(auto)%h -%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --no-merges
ln = !git --no-pager lg -5
my = lg --author erus
standup = lg --since yesterday --author erus --all
co-authors = !git log | grep -i Co-Authored | awk '!a[$0]++'
when = git for-each-ref --sort=committerdate --format='%(refname:short) * %(authorname) * %(committerdate:relative)' refs/remotes/ # List all branches with their last updates
dir = !git root | sed 's/$/\\/.git/' | grep --color=never "/" # grep ensures a proper exit status on fail
upstream = !git rev-parse --abbrev-ref --symbolic-full-name @{u} || echo origin/$(git curbranch)
a = add -u
aa = add -u .
2020-10-03 09:37:54 +00:00
ap = add -p
c = commit -v
co = checkout
cb = checkout -b
cp = cherry-pick
rb = rebase
rbc = rebase --continue
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
rh = reset HEAD~
rs = reset --keep
ru = reset --keep @{u}
unstage = reset HEAD --
gcr = !git gc && git repack -a -d
ready = rebase -i @{u}
format-head = !git stash && git-clang-format HEAD~ && git commit -a --amend --no-edit && git stash pop
sm = !git submodule init && git submodule update
# yadm
add-git = !yadm add $XDG_CONFIG_HOME/git/config $CONFIG_SHELLS/git
add-vim = !yadm add $XDG_CONFIG_HOME/nvim/init*
add-shell = !yadm add $CONFIG_SHELLS
2020-10-07 19:54:05 +00:00
add-bin = !yadm add -u $HOME/.local/bin
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