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