-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
117 lines (92 loc) · 3 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
[hub]
protocol = https
[http]
sslVerify = false
[core]
excludesfile = ~/.gitignore_global
[user]
name = Ronei Chiarandi
email = [email protected]
[push]
default = simple
[pull]
rebase = true
[merge]
log = true
ff = false
[color]
ui = true
pager = 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 = green
untracked = red
[credential]
helper = store
[format]
pretty = format:'%C(red)%h%Creset: %C(cyan)%an%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset'
[alias]
# help
aliases = config --get-regexp alias
contributors = shortlog --summary --numbered
# warning - remove branches that have already been merged with master
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# Show verbose output about tags, branches or remotes
branchs = branch -a
remotes = remote -v
tags = tag -l
tag = tag
# General
master = checkout master
undo = reset --soft HEAD~1
all = add --all
co = checkout
cb = checkout -b
ci = commit
st = status
c = commit -m
s = status -s
a = add
d = diff
pm = push origin master
pl = pull origin master
# Branch
pub = "!git push origin \"$(git rev-parse --abbrev-ref HEAD)\""
plb = "!git pull origin \"$(git rev-parse --abbrev-ref HEAD)\""
branch-stream = "!git branch --set-upstream-to=origin/\"$(git rev-parse --abbrev-ref HEAD)\""
# Merge
revert-merge = reset --hard HEAD^
m = merge --no-edit
# Submodule
sm = push origin HEAD:master
ps = !"git pull; git submodule foreach git pull origin master"
# Remove all remote merged
#rm-merge = branch -r --merged | grep -v master | sed 's/origin\///' | xargs -n 1 git push --delete origin
# Diff & Logs
diffst = diff --stat # Diff overview
grapha = log --pretty=nice --date-order --graph --all # Custom graph log for all branches
diffc = diff --cached # Diff what is staged for the next commit
graph = log --pretty=nice --date-order --graph # Custom graph log (append any tree-ish)
logst = log --stat # Diffstat log
logsf = log --stat --format=oneline --abbrev-commit # Short format diffstat log
logp = log --pretty=nice --date-order # Custom pretty log
# Tree log
tree = log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
[fetch]
prune = true
[branch]
autosetuprebase = always
[pretty]
# tut: http://gitimmersion.com/lab_10.html
# ref: http://linux.die.net/man/1/git-log
# Result: <short-sha> <commit-message> (<pointer-names>) -- <commit-author-name>; <relative-time>
nice = "%C(yellow)%h%C(reset) %C(white)%s%C(cyan)%d%C(reset) -- %an; %ar"