forked from ryanb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
58 lines (55 loc) · 1.79 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[user]
name = Guewen Baconnier
email = [email protected]
[alias]
co = checkout
ui = auto
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
pushf = push --force-with-lease
recent-branches = "!git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' | nl -w2 -s'> ' "
r = "!f() { if [ -z \"$1\" ]; then git recent-branches; else git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' | awk -v var=\"$1\" 'NR==var' | xargs git checkout ; fi ; }; f"
go = "!git for-each-ref --count=50 --sort=-committerdate refs/heads/ --format='%(refname:short)' | fzf | xargs -o git checkout"
f = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git fixup"
fixup = "!f() { \
if [ -z \"$1\" ]; then \
git f; \
else \
git diff-files --quiet || (echo Unstaged changes, please commit or stash with --keep-index; exit 1); \
COMMIT=$(git rev-parse $1) && git commit --fixup=$COMMIT && git rebase -i --autosquash $COMMIT~1 ; \
fi ; }; f"
[color]
diff = auto
status = auto
branch = auto
[merge]
tool = vimdiff
conflictstyle = diff3
[rebase]
autosquash = true
[mergetool]
prompt = false
[core]
excludesfile = <%= ENV['HOME'] %>/.gitignore
editor = emacsclient -c
autocrlf = input
[apply]
whitespace = nowarn
[format]
pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
[github]
user = guewen
token =
[push]
default = simple
[rerere]
enabled = true
[diff]
algorithm = histogram
[diff "sops"]
textconv = sops-git-diff-helper
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true