]> git.phdru.name Git - dotfiles.git/blob - .gitconfig
.gitconfig: add `alias' and `aliases' aliases
[dotfiles.git] / .gitconfig
1 [alias]
2         alias = "!f() { [ $# = 2 ] && git config --global alias.\"$1\" \"$2\" && return 0 || echo \"Usage: git alias <new alias> <original command>\" >&2 && return 1; }; f"
3         aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
4         b = branch
5         branches = branch -a
6         camend = commit --amend -C HEAD
7         checkin = commit
8         ci = commit
9         co = checkout
10         d = diff
11         dc = diff --cached
12         dshow = show --decorate
13         l = log --decorate
14         l1 = log --decorate --oneline
15         l5 = log --decorate -5
16         lg = log --decorate --graph
17         lg1 = log --decorate --graph --oneline
18         lg5 = log --decorate --graph -5
19         lr = log --decorate --reverse
20         lr1 = log --decorate --reverse --oneline
21         lr5 = log --decorate --reverse -5
22         null-merge = merge --strategy=ours
23         remotes = remote -v
24         ri = "!f() { git rebase --interactive --autosquash --preserve-merges ${1:-\"@{u\\}\"}; }; f"
25         #root = !pwd
26         root = rev-parse --show-toplevel
27         st = status --short
28         stb = status --short --branch
29         tags = tag -l
30         unstage = reset HEAD --
31         wdiff = diff --word-diff
32         wshow = show --word-diff --decorate
33
34 [branch]
35         autosetuprebase = always
36
37 [color]
38         ui = auto
39
40 [include]
41         path = ~/lib/config/git/light_bg
42
43 [log]
44         abbrevCommit = true
45
46 [merge]
47         tool = vimdiff
48
49 #[mergetool "vimdiff3"]
50 # Don't forget to add -f for gvim
51 # 3 way diffs
52 #       cmd = vim -d \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" -c \"wincmd J\"
53
54 [receive]
55         denyNonFastForwards = true
56
57 [web]
58         browser = webbrowser
59
60 [browser "webbrowser"]
61         cmd = webbrowser -n
62
63 [gui]
64         fontui = -family \"DejaVu Sans\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0
65         fontdiff = -family \"DejaVu Sans Mono\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0