-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig-macos
128 lines (117 loc) · 4.75 KB
/
gitconfig-macos
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
[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
st = "!~/.gitLib/bin/git-st"
s = "!~/.gitLib/bin/git-st"
tst = "!~/.gitLib/bin/git-st"
stm = "!~/.gitLib/bin/git-st --modified"
sta = "!~/.gitLib/bin/git-st --added"
std = "!~/.gitLib/bin/git-st --deleted"
stu = "!~/.gitLib/bin/git-st --unmerged"
s2a = "!~/.gitLib/bin/git-st --to-add"
stmv = "!~/.gitLib/bin/git-st --modifiedv"
stav = "!~/.gitLib/bin/git-st --addedv"
stdv = "!~/.gitLib/bin/git-st --deletedv"
s2av = "!~/.gitLib/bin/git-st --to-addv"
# BRANCHES ACTIONS
br = "!~/.gitLib/bin/git-br"
brm = "!~/.gitLib/bin/git-br --rm"
pwd = "!~/.gitLib/bin/git-br --pwd"
bra = "!~/.gitLib/bin/git-br --all"
who = "!~/.gitLib/bin/git-br --who"
whop = "!~/.gitLib/bin/git-br --who-porcelain"
old = "!~/.gitLib/bin/git-br --old-pwd"
sw = "!~/.gitLib/bin/git-br --switch"
swh = "!~/.gitLib/bin/git-br --switch-history"
mine = "!~/.gitLib/bin/git-br --mine"
m9 = "!~/.gitLib/bin/git-br --mine-porcelain"
m8 = "!~/.gitLib/bin/git-br --mine-short-porcelain"
relu = "!~/.gitLib/bin/git-br --release-unmerged" # display all released branches unmerged in
dev = "! git branch -a | grep feature"
rel = "! git branch -a | grep release"
new = "!~/.gitLib/bin/git-new"
# 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
l = "!~/.gitLib/bin/git-l"
lg = "!~/.gitLib/bin/git-l -g"
la = "!~/.gitLib/bin/git-l -a"
lgs = "!~/.gitLib/bin/git-l -g -s"
lga = "!~/.gitLib/bin/git-l -g -a"
# log not in origin/develop
ln = "!~/.gitLib/bin/git-l --not"
lns = "!~/.gitLib/bin/git-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