Files
dotfiles/git/.gitconfig
Christian Nieves aefb0f1815 global gitignore
2024-12-15 12:43:08 -06:00

52 lines
1.5 KiB
INI

[user]
name = Christian Nieves
email = cnieves@google.com
[color]
ui = auto
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
[alias]
gr = 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
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
ap = add -p
c = commit --verbose
ca = commit -a --verbose
cm = commit -m
cam = commit -a -m
m = commit --amend --verbose
dt = icdiff
; d = diff
; ds = diff --stat
dc = icdiff --cached
s = status -s
st = status -s
co = checkout
cob = checkout -b
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
po = push origin
[core]
autocrlf = false
excludesfile = /Users/christian/.gitignore_global
[icdiff]
options = --highlight --line-numbers
[merge]
tool = "nvim"
[mergetool "nvim"]
cmd = nvim -d -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"
[diff]
tool = icdiff
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true