dotfiles/dot_gitconfig
2023-11-19 02:40:04 +01:00

130 lines
3.3 KiB
Plaintext

[include]
path = ~/.gitconfig-extra
[branch "master"]
remote = origin
merge = refs/heads/master
[color]
branch = always
diff = always
grep = always
interactive = always
pager = true
showbranch = auto
status = auto
ui = always
[color "interactive"]
error = red bold
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
whitespace = white reverse
[color "status"]
added = green
changed = yellow
untracked = red
branch = blue
[core]
pager = less -FRSX
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[credential]
helper = cache --timeout=1209600
[diff]
tool = vimdiff
[difftool]
prompt = false
[merge]
tool = vimdiff
[alias]
# branch
bc = checkout -b
br = branch
bx = branch -d
bX = branch -D
# checkout/fetch/merge/push/rebase
# checkout
co = checkout
co0 = checkout HEAD --
# fetch
f = fetch
# merge
m = merge
mom = merge origin/master
# push
p = push
# rebase
r = rebase
ra = rebase --abort
rc = rebase --continue
ri = rebase --interactive
rom = rebase origin/master
# commit
c = commit -v
cm = commit --message
camend = commit --amend --reuse-message HEAD
# diff
d = diff # Diff working dir to index
ds = diff --staged # Diff index to HEAD
dc = diff --staged # Diff index to HEAD
dh = diff HEAD # Diff working dir and index to HEAD
# index
st = status
a = add
ir = reset
# log
l = log --topo-order --pretty=format:'%C(yellow)%h %C(cyan)%cn %C(blue)%cr%C(reset) %s'
ls = log --topo-order --stat --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
ld = log --topo-order --stat --patch --full-diff --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lga = log --topo-order --all --graph --pretty=format:'%C(yellow)%h %C(cyan)%cn%C(reset) %s %C(red)%d%C(reset)%n'
lm = log --topo-order --pretty=format:'%s'
lh = shortlog --summary --numbered
llf = fsck --lost-found
lg1 = log --graph --abbrev-commit --decorate --date=relative --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
lg2 = 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
[push]
default = current
[url "git@github.com:"]
insteadOf = github:
[pull]
rebase = true
[init]
defaultBranch = main
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true