-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
124 lines (113 loc) · 4 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
118
119
120
121
122
123
124
[user]
name = firstname lastname / organisation
email = [email protected]
[core]
editor = vim
excludesfile = ~/.gitLib/conf/ignore_global
fileMode = false
sharedRepository = group
precomposeunicode = false
quotePath = false
[merge]
commit = no
tool = vimdiff
[alias]
# BASICS
ci = commit
cia = commit --amend
co = checkout
# STATUS
s = st
tst = st
stm = st --modified
sta = st --added
std = st --deleted
stu = st --unmerged
s2a = st --to-add
stmv = st --modifiedv
stav = st --addedv
stdv = st --deletedv
s2av = st --to-addv
# BRANCHES ACTIONS
brm = br --rm
pwd = br --pwd
bra = br --all
who = br --who
whop = br --who-porcelain
old = br --old-pwd
sw = br --switch
swh = br --switch-history
mine = br --mine
m9 = br --mine-porcelain
m8 = br --mine-short-porcelain
relu = br --release-unmerged # display all released branches unmerged in
dev = "! git branch -a | grep feature"
rel = "! git branch -a | grep release"
# INDEX
empty = "! f(){ git add -N $1; }; f" # new empty file
assume = update-index --assume-unchanged # ignore futures modifications
unassume = update-index --no-assume-unchanged # un-ignore futures modifications
# LOG
lg = l -g
la = l -a
lgs = l -g -s
lga = l -g -a
# log not in origin/develop
ln = l --not
lns = l --not --short
# DIFF & MERGE
df = diff -U5
dfs = diff --name-only # diff short
dfc = diff -U5 --cached
dft = difftool -y
mg = merge -X ignore-space-change -X ignore-all-space -X ignore-space-at-eol
mgn = merge -X ignore-space-change -X ignore-all-space -X ignore-space-at-eol --no-commit
mgt = mergetool -y
mga = merge --abort
mgc = merge --continue
# PUSH
pushf = push --force
pushu = "! f(){ git push --set-upstream ${1:-origin} `git pwd`; }; f"
setu = "! f(){ local branch=${2:-`git pwd`} ; git branch --set-upstream-to=${1:-origin}/${branch} ${branch}; }; f"
# ADVANCED REBASE ALIASES
rb = rebase -X ignore-space-change -X ignore-all-space -X ignore-space-at-eol -X ignore-blank-lines -X "diff-algorithm=histogram"
rbii = rebase -X ignore-space-change -X ignore-all-space -X ignore-space-at-eol -X ignore-blank-lines --interactive
rbi = rebase --interactive
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
# BISECT
bss = bisect start
bsb = bisect bad
bsg = bisect good
bsr = bisect reset
bsrun = bisect run
# ADVANCED LOG FORMATS
stat = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev=8 --abbrev-commit --date=iso --stat
lp = log --abbrev=8 --abbrev-commit --date=iso --patch
lh = log --abbrev=8 --abbrev-commit --date=iso --patch --histogram
# ADVANCED STASH COMMANDS
sts = stash --keep-index
pop = stash pop
drop = "! f(){ local _stash=${1:-0} ; git stash drop stash@{$_stash}}; }; f"
save = "! f() { local mess=\"$@\"; while [ -z \"$mess\" ] ; do echo -n \"give me a message : \" && read mess; done; git stash save -u \"$mess\"; }; f"
ls = stash list
list = stash list
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = auto
[pull]
default = simple
[push]
default = simple
[commit]
template = ~/.gitLib/conf/commit-message.txt
[init]
templatedir = ~/.gitLib/conf/templates/
[rerere]
enabled = true
[tag]
sort = version:refname