-
Sven Mäder authoredSven Mäder authored
.gitconfig 5.17 KiB
[core]
editor = vim
excludesfile = ~/.gitignore_global
pager = LESS='--tabs=4 -RFX' delta
#pager = diff-so-fancy | less --tabs=4 -RFX
#pager = delta --diff-so-fancy --syntax-theme="DarkNeon"
#pager = delta --dark --plus-color="#004200" --minus-color="#420000" --theme="DarkNeon" --highlight-removed
#pager = delta --dark --plus-color="#004d1e" --minus-color="#5e000a" --theme="DarkNeon" --highlight-removed
[user]
name = Sven Mäder
email = maeder@phys.ethz.ch
signingkey = 8F3FB7BD7A6BF71D
[gitlab]
#url = "https://gitlab.phys.ethz.ch"
#token = ""
[color]
ui = auto
[color "diff"]
meta = 240 # metainformation
frag = cyan # line number in hunk header
func = white # function name in hunk header
plain = white # context text
new = green # added lines
old = red # removed lines
commit = yellow # commit headers
whitespace = red reverse # whitespace errors
[color "diff-highlight"]
oldNormal = red
oldHighlight = red 52
newNormal = green
newHighlight = green 22
[color "status"]
added = green
changed = red
untracked = yellow
[color "grep"]
filename = yellow
[color "decorate"]
head = "#00afaf"
branch = "#87d787"
remoteBranch = "#ff5fff"
#tag
#stash
[diff]
tool = vimdiff
compactionHeuristic = true
colorMoved = default
[difftool]
prompt = true
[delta]
navigate = true # use n and N to move between diff sections
dark = true
commit-style = raw
file-style = raw
dark = true
highligh-removed = true
navigate = true
side-by-side = false
plus-style = "syntax #004200"
minus-style = "syntax #420000"
theme = "DarkNeon"
grep-file-style = yellow
grep-line-number-style = orange
grep-match-word-style = red bold
[diff-so-fancy]
# Disable green marker at the beginning of new empty lines
markEmptyLines = false
[diff "ansible-vault"]
textconv = ansible-vault view
cachetextconv = false
[merge]
tool = vimdiff
[interactive]
singlekey = true
[push]
default = simple
[pull]
# Only pull if fast-forward is possible. Use `git pull --rebase` or `git pull --no-ff` alternatively.
# Do not set `ff = only` in combination with `rebase = true` to allow automatic rebasing of local commits.
ff = only
# Use `git pull --rebase` by default, alternatively use `git fetch; git merge` (discouraged in most situations)
#rebase = true
[rebase]
# Automatically stash and pop your uncommitted changes while rebasing
#autoStash = true
[safe]
#directory = /homenfs/isg/git/passkeeper
#directory = /homenfs/isg/git/passkeeper/.git
#directory = /homenfs/isg/git/digicert.git
# insecure (used for local submodule clone testing)
#[protocol "file"]
# allow = always
[alias]
co = checkout
st = status
# diff and show based on words instead of lines
diffw = diff --color-words
showw = show --color-words
d = diff
dc = diff --cached
ds = diff --staged
wd = diff --color-words
wdc = diff --cached --color-words
wdiff = diff --color-words
ci = commit -v
cm = commit -m
aa = add -A
undo = reset --hard
ls = ls-files
k = !gitk --all
pra = pull --rebase --autostash
su = submodule update --recursive --remote
ranking = "!git shortlog | egrep -v '^ |^$' | sed -e 's/^\\(.*\\) (\\(.*\\)):/\\2 \\1/' | sort -rn"
addremove = "!git add . && git ls-files --deleted | xargs --no-run-if-empty git rm"
# prettier log (limited to 10 commits)
logg = !git --no-pager log --pretty=tformat:'%Creset (%ar) - %Cred %an: %Cgreen %s %Creset' --graph -n 10
# prettier log (limited to 10 commits, showing hash)
loggh = !git --no-pager log --pretty=tformat:'%C(yellow) %H %Creset (%ar) - %Cred %an: %Cgreen %s %Creset' --graph -n 10
# prettier log (showing all commits)
logga = log --pretty=format:'%Creset (%ar) - %Cred %an: %Cgreen %s' --graph
# prettier log (showing all commits, showing hash)
loggha = log --pretty=format:'%C(yellow) %H %Creset (%ar) - %Cred %an: %Cgreen %s' --graph
loggah = log --pretty=format:'%C(yellow) %H %Creset (%ar) - %Cred %an: %Cgreen %s' --graph
adogb = log --all --decorate --oneline --graph
adogv = !"git adogb --format=format:'%C(#d7ff5f)%h%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(#5fd7ff)%an%C(reset) %C(#d7d7ff)(%ar)%C(reset)'"
adogd = !"git adogb --date=format:'%Y-%m-%d %H:%M:%S' --format=format:'%C(#d7ff5f)%h%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(#5fd7ff)%an%C(reset) %C(#d7d7ff)(%ad)%C(reset)'"
adogj = !"git adogv"
adog = !"git adogv"
adogg = !"git adogv -i --grep"
adogdg = !"git adogd -i --grep"
# no graph:
adoggg = !"git log --all --decorate --oneline --format=format:'%C(#d7ff5f)%h%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(#5fd7ff)%an%C(reset) %C(#d7d7ff)(%ar)%C(reset)' -G"
adogdgg = !"git log --all --decorate --oneline --date=format:'%Y-%m-%d %H:%M:%S' --format=format:'%C(#d7ff5f)%h%C(reset)%C(auto)%d%C(reset) %C(normal)%s%C(reset) %C(#5fd7ff)%an%C(reset) %C(#d7d7ff)(%ad)%C(reset)' -G"