-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
174 lines (135 loc) · 5 KB
/
gitconfig
File metadata and controls
174 lines (135 loc) · 5 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
[credential]
helper = cache --timeout=36000
[alias]
# short aliases
st = status --short
stt = status
co = checkout
ci = commit
cis = commit -s
cilm = commit -C HEAD --reset-author
cilmm = commit -c HEAD --reset-author
bl = blame -w
df = diff --word-diff=color
sdf = diff -b --staged
wdiff = diff --color-words
swdiff = diff --color-words --staged
lgg = log -p
lgf = log --patch --follow
rso = remote show origin
me = config user.name
up = !git update
smash = !git ir
unstage = reset HEAD
undo-commit = reset --soft HEAD^
# interactive rebase
ir = !sh -c 'git rebase -i origin/${1-master}' -
# log aliases
log-branch = log origin/master..
blog = !git log-branch
mlog = !git log --committer=\"`git me`\"
# update current branch
update = !sh -c 'git fetch origin && git rebase -p origin/${1-master}' -
# creates a diff of current branch against supplied branch, usage: git export-branch [refbranch]
branch-name = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`
export-branch = !git format-patch --stdout $1 > ~/branches/`git branch-name`.diff
# all commits that aren't merges on all branches
all = !git log --pretty=oneline --abbrev-commit --all --no-merges
# all commits today for only me
today = !git all --since='12am' --committer=\"`git me`\"
# today's commits without formatting or paging
today-text = !git --no-pager today --no-color
# files different from master on current branch
fdm = !git diff origin/master... --name-status
# last commit info in svn style
last = !git show --name-status
last-files = !git last --pretty=format:""
# last commit only certain type of modification
mlast = !git last-files | awk 'match($1, /M/) {print $2}'
alast = !git last-files | awk 'match($1, /A/) {print $2}'
dlast = !git last-files | awk 'match($1, /D/) {print $2}'
# `git done`
# current branch: merge, push, non-forced delete branch, show info
done = !sh -c '~/bin/done -d $1' -
# `git publish`
# current branch: merge, push, show info
publish = !sh -c '~/bin/done $1' -
# `git lint`
# lints all .php files that are different between current branch and origin/master
lint = !sh -c '~/bin/lint'
# `git spawn my-new-branch`
# make new branch based on master no matter which branch is checked out
spawn = !sh -c 'git checkout -b $1 ${2-master} && git config branch.$1.localmerge ${2-master}' -
# `git nuke my-old-branch`
# (Checks out master and does a non-forced delete on the branch entered)
nuke = !git co master && sh -c 'git br -d $1' -
# `git sync`
# update current branch and master
sync = !git update && \
git co master && \
git pull && \
git co @{-1}
# `git save`
# saves a commit in current branch: local branches you will be rebasing
save = !git commit -am \"save game\"
# attempt to cleanup some common problems
unfuck = !git fsck && git remote prune origin && git gc
# find the top level of current repository
top = !git rev-parse --show-toplevel
# list files changed by last commit in absolute location
list = !git show --pretty=format:"" --name-only | sed '/^$/d' | sed \"s|^|`git top`/|g\"
# give a count of dirty files
dirty = !git status --porcelain -uno | wc -l
# number of non-merge commits
peeps = !git log --pretty=format:"%Cblue%aN%Creset" --no-merges | sort | uniq -c | sort -rn
mergers = !git log --pretty=format:"%Cred%aN%Creset" --merges | sort | uniq -c | sort -rn
# awesome placeholders
crunk = status
deploy = status
crazy = status
stupid = status
[color]
ui = auto
[core]
autocrlf = input
ignorecase = false
whitespace = cr-at-eol
editor = vim
pager = less -x4
[push]
default = tracking
[branch]
autosetupmerge = true
autosetuprebase = always
[help]
autocorrect = 1
[push]
default = simple
[alias]
co = checkout
br = branch -a -v
cm = commit
lg = !"git lg1-specific --all"
lg1 = !"git lg2-specific --all"
lg2 = !"git lg3-specific --all"
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = cyan bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green bold
untracked = red
[grep]
lineNumber = true
[user]
name = Antoine Baudrand
email = antoine.baudrand@epitech.eu