forked from CedricGatay/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
79 lines (70 loc) · 1.77 KB
/
gitconfig
File metadata and controls
79 lines (70 loc) · 1.77 KB
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
[user]
email = m.bollot@code-troopers.com
name = Matthieu Bollot
[alias]
st = status -sb
ci = commit -s
br = branch
co = checkout
df = diff
ready = rebase -i @{u}
lg = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
ds = diff --staged # git ds - diff your staged changes == review before committing.
fup = log --since '1 day ago' --oneline --author <YOUR_EMAIL> # I know what you did yesterday - great for follow-ups
# 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
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
rp = remote prune origin
merge-log = "!f() { git log --stat \"$1^..$1\"; }; f"
[core]
pager = less -+$LESS -FRX
[rerere]
enabled = true
[push]
default = simple
[branch]
autosetuprebase = always
[status]
showUntrackedFiles = all
[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 = green
untracked = cyan
[core]
editor = vim
excludesfile = ~/.gitignore
[merge]
tool = vimdiff
[mergetool "vimdiff"]
cmd = vim -d "$LOCAL" "$MERGED" "$REMOTE"
trustExitCode = true