-
Notifications
You must be signed in to change notification settings - Fork 3
/
gitconfig
130 lines (115 loc) · 3.97 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[user]
name = Luis Bianchin
email = labianchin@users.noreply.github.com
[github]
user = labianchin
# More things: https://news.ycombinator.com/item?id=12612630
[alias]
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\t=> \\2/' | sort
all = "!f(){ find . -maxdepth 2 -type d -name .git -print0 | xargs -0 -t -I {} -P4 git --git-dir={} --work-tree={}/.. $@ ; }; f"
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
b = branch
br = branch
branchestoclean = !git branch --merged | egrep -v '\\*\\|master\\|develop'
ci = commit
cl = clone
co = checkout
coc = "!sh -c 'git checkout -b $1 --no-track remotes/origin/master' -"
fcoc = "!sh -c 'git fetch origin && git checkout -b $1 --no-track remotes/origin/master' -"
commend = "commit --amend --no-edit"
cp = cherry-pick
dc = diff --cached
df = diff
diff = diff --word-diff
f = "!git ls-files | grep -i"
fr = "!git fetch && git rebase origin/master"
grep = grep -Ii
g = grep --break --heading --line-number
ignore=!([ ! -e .gitignore ] && touch .gitignore) | echo $1 >>.gitignore
it = "!git init && git commit -m 'root' --allow-empty"
unpushed = log --branches --not --remotes --no-walk --decorate --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --abbrev-commit
l = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --abbrev-commit
lg = log -p
lsd = log --graph --decorate --pretty=oneline --abbrev-commit --all
latest = !sh -c 'git log $1@{1}..$1@{0} "$@"'
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
pf = push --force-with-lease
prune = fetch --prune
ra = rebase --abort
ri = rebase --interactive
rim = "!f() { git rebase --interactive $1 && git rebase origin/master ; }; f"
rc = rebase --continue
rs = rebase --skip
rp = "!git fetch && git stash save && git checkout $1 && git rebase origin/master && git push -f"
sba = "!f() { git subtree add --prefix $2 $1 master --squash; }; f"
sbu = "!f() { git subtree pull --prefix $2 $1 master --squash; }; f"
s = status
st = status
sr = svn rebase
sc = svn dcommit
sd = svn dcommit
sl = stash list
sa = stash apply
sp = stash pop
ss = stash save
srp = "!git stash save && git svn rebase && git stash pop"
shorty = "status --short --branch"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
pp = "!git push origin master && git push origin master:gh-pages"
pr = "!hub pull-request"
please = "push --force-with-lease"
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
x = commit -m
xa = commit -a -m
undo = reset --soft HEAD^
vol = "!git rev-list --objects --all | awk '$2' | sort -k2 | uniq -cf1 | sort -rn | head -n 20"
vol2 = "!git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -10"
what = show -s --pretty='tformat:%h (%s, %ad)' --date=short
who = shortlog -s --
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
watch = "!while :; do clear; git status --short; git --no-pager diff --shortstat; sleep 2; done"
[core]
editor = nvim
excludesfile = ~/.gitignore_global
autocrlf = input
;whitespace = trailing-space,space-before-tab
[color]
ui = true
branch = auto
diff = auto
status = auto
[color "branch"]
current = red reverse
local = blue
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[credential]
helper = osxkeychain
[grep]
lineNumber = true
extendRegexp = true
[web]
browser = open
[svn]
rmdir = true
[pull]
rebase = true
[push]
default = simple
followTags = true
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true