wiki/.gitconfig
2021-08-31 16:19:12 +02:00

62 lines
2.0 KiB
INI

[user]
name = Alban Bronisz
email = alban.bronisz@probayes.com
[push]
# Only push current branch
default = simple
[alias]
# The full history
hist = log --pretty='%h %ad | %s%d [%an]' --graph --date=short
# A short history, can be longer using for instance git h -20
h = log --pretty='%h %ad | %s%d [%an]' --graph --date=short -5
ignore = update-index --assume-unchanged
ignored = !git ls-files -v | grep ^[[:lower:]]
s = status
b = branch -avv
a = add -A -p
aw = -c interactive.diffFilter=\"git diff --color-words\" add -A -p
#staged ---------------------------------
# ^ | ^
# | | |
# | git a | git rs |
# | v |
#not staged ----------------------------- |git ds
# ^ | | ^
# | | | | git d
# | git add xx | git r | |
# | v v v
#unmodified -----------------------------
# ^ |
# | |
# | git sp | git ss
# | v
#stash -----------------------------
# usage: git co "commit message"
co = commit -m
deco = reset --soft HEAD^
# d=diff (s=staged)
d = diff
ds = diff --cached
# r=restore (s=staged)
r = restore -p
rs = restore -p --staged
# s=stash (save/list/pop)
ss = stash save
sl = stash list
sp = stash pop
# c=config (global/edit)
cg = config --global --edit
cl = config --local --edit
[core]
excludesfile = /home/abronisz/.gitignore_global
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[pull]
# Only pull if fast forward, otherwise need to use pull --rebase (to avoid pull merge)
ff = only