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