-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
61 lines (57 loc) · 1.72 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
[user]
name =
email =
[core]
editor = emacs
excludesfile = /Users/rizza/.gitignore_global
[diff]
external = /Users/rizza/bin/gitdiffwrapper.sh
[merge]
tool = kdiff3
[difftool]
prompt = NO
[alias]
co = checkout
[difftool "diffmerge"]
cmd = /Applications/DiffMerge.app/Contents/MacOS/diffmerge\n--merge --result=$MERGED $LOCAL $BASE $REMOTE
[github]
user = rizzza
[help]
autocorrect = 1
[alias]
dt = difftool # use gui diff for changes
dtc = difftool --cached # use gui diff for changes in staging
ds = diff --staged # git ds - diff your staged changes == review before committing.
st = status -sb # smarter status - include tag and branch info
fup = log --since '1 day ago' --oneline --author <YOUR_EMAIL> # I know what you did yesterday - great for follow-ups
ls = log --pretty=format:\"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]\" --decorate --date=short # pretty one-line log with tags, branches and authors
lsv = log --pretty=format:\"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]\" --decorate --date=short --numstat # a verbose ls, shows changed files too
# some resets without explanation
r = reset
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
# basic shortcuts
cp = cherry-pick
cl = clone
ci = commit
co = checkout
br = branch
diff = diff --word-diff
dc = diff --cached
# stash shortcuts
sl = stash list
sa = stash apply
ss = stash save
# log related - thanks to @mwd410
l = log
lh = log --graph
la = !git lh --date-order --all 2> /dev/null
lb = log --graph --simplify-by-decoration
lba = !git lb --all
h = !git --no-pager log --graph -n 15
a = !git --no-pager la -n 15
[credential]
helper = cache