-
Notifications
You must be signed in to change notification settings - Fork 1
/
gitconfig
47 lines (46 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
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = red
untracked = cyan
[color "diff"]
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesFile = ~/.gitignore_global
editor = /usr/bin/vim
[push]
default = upstream
[pull]
ff = only
[alias]
cb = rev-parse --abbrev-ref HEAD
down = pull --ff-only --prune
onup = "!git push -u origin `git cb`"
deliver = merge --no-ff
sweepbranches="!git branch --merged | grep --invert-match `git rev-parse --abbrev-ref HEAD` | xargs -n 1 git branch --delete"
gui = !sh -c '/usr/local/git/libexec/git-core/git-gui'
home = rev-parse --show-toplevel
author = "!git --no-pager log -1 --pretty=format:%ae%n"
# Nice branch aging from https://gist.github.com/ultrasaurus/ce31548b1bf32fd73340
aging = for-each-ref --sort='-authordate:iso8601' --format=' %(color:yellow)%(authordate:relative)%09%(color:blue)[%(authorname)] %(color:green)%(refname:short)' +refs/heads/*:refs/remotes/origin/*
# Inspiration: http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
la = "!git config -l | grep alias | cut -c 7-"
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(green)%d%Creset %s %C(yellow)(%ad) %C(blue)[%an]%Creset' --abbrev-commit --date=relative
ll = log --pretty=format:'%C(red)%h%Cgreen%d %Creset%s %C(yellow)(%ad) %C(blue)[%cn]' --decorate --numstat --date=relative
filelog = log -u
fl = log -u
f = "!git ls-files | grep -i"
gr = grep -nIi
st = status -sb
graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(cyan)(%an)%Creset' --date=relative