-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
86 lines (71 loc) · 1.94 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
# git global config
[core]
pager = less -FRSX
editor = vim -f
autocrlf = input
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[github]
user = nicopernas
[color]
diff = auto
branch = auto
interactive = auto
ui = true
pager = true
status = auto
[color "status"]
added = green
changed = yellow
untracked = magenta
deleted = red
[color "branch"]
current = magenta
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[push]
default = current
[pull]
rebase = true
[help]
autocorrect = 1
[diff]
tool = meld
guitool = meld
[merge]
tool = meld
[difftool]
prompt = false
[mergetool]
keepBackup = false
prompt = false
[alias]
mylog = log --perl-regexp --author='Nicol.s Pernas Maradei' --oneline
today = log --perl-regexp --author='Nicol.s Pernas Maradei' --oneline --since=midnight
unstage = reset HEAD --
last = log -1 HEAD
ci = commit -v
sci = commit -s -v
co = checkout
st = status
lg = log --graph --pretty=format:'%C(yellow)%h%Cred%d%Creset %s %C(white)%C(cyan)%an <%ae>%Creset, %C(green)%ar%Creset'
fork = checkout -b
undo = checkout --
back = checkout -
diffc = diff --cached
pullr = pull --rebase
diffw = diff --color-words
stashed = stash list --pretty=format:'%gd: %Cred%h%Creset %Cgreen[%ar]%Creset %s'
save4later = stash save
rbi = "!f() { git rebase -i HEAD~$1; }; f"
fc = "!f() { git commit --fixup=$1; }; f"
su = submodule update
pick = cherry-pick
open-modified = "!f() { git status --porcelain | awk '/^[ ]?(M|U)/ {print $2}' | xargs -o vim -p; }; f"
open-last = "!f() { git diff-tree --no-commit-id --name-only -r HEAD^..HEAD | xargs -o vim -p; }; f"
clang-format = "!f() { git add -u && git status --porcelain | awk '/^M/ { print $2 }' | xargs -o clang-format -i; }; f"
fix-author-date = "!f() { git rebase $1 -i --exec 'git commit --amend --no-edit --date=now' --exec 'sleep 1'; }; f"