2 # I copied some aliases from http://gitalias.com/ and other sources.
3 # Some I've added to gitalias. Some are mine.
5 # One letter alias for our most frequent commands.
30 be = branch --edit-description
34 bnm = branch --no-merged
38 ci = commit --interactive
52 # diff - show changes not yet staged
55 # diff - changes about to be commited
58 # diff - show changes but by word, not line
67 rbc = rebase --continue
81 # show-branch - print a list of branches and their commits.
88 ssb = status --short --branch
90 aliases = !"git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'"
94 # Find text in any commit ever
95 grep-all = !"f() { git rev-list --all | xargs git grep \"$@\"; }; f"
97 # Editing and adding conflicted files: when we get many merge conflicts
98 # and want to quickly solve them using an editor, then add the files.
99 edit-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
100 add-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
102 # Get the current branch name
103 branch-name = rev-parse --abbrev-ref HEAD
105 add-alias = "!f() { [ $# = 3 ] && git config $1 alias.\"$2\" \"$3\" && return 0 || echo \"Usage: git [local-]alias <new alias> <original command>\" >&2 && return 1; }; f"
106 alias = "!git add-alias --global"
107 alias-local = "!git add-alias --local"
108 local-alias = "!git add-alias --local"
109 aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
111 branches = branch --all
116 camend = commit --amend --no-edit
122 dshow = show --decorate
123 incoming = !git remote update --prune; git log ..@{upstream}
125 l1 = log --decorate --oneline
126 l5 = log --decorate -5
127 lg = log --decorate --graph
128 lg1 = log --decorate --graph --oneline
129 lg5 = log --decorate --graph -5
130 lr = log --decorate --reverse
131 lr1 = log --decorate --reverse --oneline
132 lr5 = log --decorate --reverse -5
133 null-merge = merge --strategy=ours
134 outgoing = log @{upstream}..
135 push2all = !git remote | xargs -I% -n1 git push %
137 ri = "!f() { git rebase --interactive --autosquash --preserve-merges ${1:-\"@{upstream\\}\"}; }; f"
139 root = rev-parse --show-toplevel
141 stb = status --short --branch
143 unstage = reset HEAD --
144 wdiff = diff --word-diff
145 wshow = show --word-diff --decorate
148 autosetuprebase = always
154 path = ~/lib/config/git/light_bg
162 #[mergetool "vimdiff3"]
163 # Don't forget to add -f for gvim
165 # cmd = vim -d \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" -c \"wincmd J\"
171 denyNonFastForwards = true
176 [browser "webbrowser"]
180 fontui = -family \"DejaVu Sans\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0
181 fontdiff = -family \"DejaVu Sans Mono\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0