dotfiles/general/.config/git/config

125 lines
2.8 KiB
Plaintext
Raw Normal View History

2021-05-29 16:10:23 +02:00
[user]
2021-06-28 12:48:11 +02:00
name = h7x4
email = h7x4abk3g@protonmail.com
2021-10-24 02:44:58 +02:00
[core]
excludesfile = ~/.config/git/ignore
attributesfile = ~/.config/git/attributes
# Treat spaces before tabs and all kinds of trailing whitespace as an error.
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
precomposeunicode = false
untrackedCache = true
editor = nvim
pager = less
2021-05-29 16:10:23 +02:00
[alias]
2021-06-28 12:48:11 +02:00
aliases = !git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'
uncommit = "reset --soft HEAD^"
2021-05-29 16:10:23 +02:00
rev = "checkout HEAD -- "
revall = "checkout ."
2021-10-24 02:44:58 +02:00
; unstage = "rm --cached "
unstage = "restore --staged "
2021-06-28 12:48:11 +02:00
delete-merged = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
mkbr = "checkout -b"
mvbr = "branch -m"
rmbr = "branch -d"
rrmbr = "push origin --delete"
2021-05-29 16:10:23 +02:00
graph = "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(bold yellow)%d%C(reset)' --all"
graphv = "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"
g = !"git graph"
2021-10-24 02:44:58 +02:00
# Colors
2021-06-28 12:48:11 +02:00
2021-10-24 02:44:58 +02:00
[color "branch"]
upstream = cyan
2021-06-28 12:48:11 +02:00
2021-05-29 16:10:23 +02:00
[color]
2021-06-28 12:48:11 +02:00
ui = auto
2021-05-29 16:10:23 +02:00
2021-10-24 02:44:58 +02:00
# Commands
2021-05-29 16:10:23 +02:00
2021-10-24 02:44:58 +02:00
[init]
defaultBranch = main
[fetch]
prune = true
[pull]
rebase = true
[push]
default = current
2021-06-28 12:48:11 +02:00
[merge]
tool = nvimdiff
conflictstyle = diff3
2021-10-24 02:44:58 +02:00
colorMoved = zebra
2021-06-28 12:48:11 +02:00
[mergetool]
keepBackup = false
[mergetool "nvimdiff"]
cmd = "nvim -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'"
2021-10-24 02:44:58 +02:00
[diff]
mnemonicPrefix = true
renames=true
tool = nvimdiff
2021-06-28 12:48:11 +02:00
[grep]
break = true
heading = true
lineNumber = true
extendedRegexp = true
2021-10-24 02:44:58 +02:00
[instaweb]
local = true
port = 9876
# Upstream
[github]
user = h7x4abk3g
2021-06-28 12:48:11 +02:00
[url "git@github.com:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "git@gist.github.com:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[url "aur@aur.archlinux.org:"]
insteadOf = "aur:"
pushInsteadOf = "aur:"
pushInsteadOf = "git://aur.archlinux.org/"
[url "git@gitlab.stud.idi.ntnu.no"]
insteadOf = "ntnu:"
pushInsteadOf = "ntnu:"
pushInsteadOf = "git://gitlab.stud.idi.ntnu.no/"
2021-10-24 02:44:58 +02:00
# Misc
[web]
browser = google-chrome-stable
[filter "lfs"]
required = true
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
clean = git-lfs clean -- %f