-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
117 lines (116 loc) · 3.13 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
[user]
name = p-herbert
email = [email protected]
[core]
autocrlf = input
safecrlf = true
excludesfile = $HOME/.gitignore
pager = diff-so-fancy | less --tabs=4 -RFX
[push]
default = current
followTags = true
[branch]
autoSetupMerge = always
[color]
ui = auto
[merge]
tool = vimdiff
[mergetool]
prompt = false
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
[url "ssh://[email protected]/"]
insteadOf = https://gitlab.com/
[includeIf "gitdir:~/Documents/Development/point-*"]
path = .gitconfig.gitlab
[alias]
##########
a = "!f() { git add $(git status -s | cut -c4- | awk -v line=$1 'NR==line'); }; f"
aa = add .
ac = "!f() { git add $1 && git ci; }; f"
ai = add -i
##########
bi = bisect
##########
bm = branch -m
br = branch
bu = branch -u
buo = branch -u origin
brd = branch -d
##########
dump = cat-file -p
type = cat-file -t
##########
co = checkout
cob = checkout -b
cod = checkout development
com = checkout main
##########
ci = commit
##########
cl = clone
##########
cp = cherry-pick
##########
d = "!f() { git diff $(git status -s | cut -c4- | awk -v line=$1 'NR==line'); }; f"
di = diff
dc = diff --cached
ds = diff --stat
##########
f = "!f() { regex=${1}; file=${2}; git log -p -G"$regex" $file; }; f"
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lg = log --graph --abbrev-commit --decorate --date=short --all --pretty=format:'%C(yellow)%h%Creset %Cblue%ad%Creset %Cgreen%aN%Creset %s%C(bold yellow)%d%C(reset)'
##########
m = merge
ma = merge --abort
mc = merge --continue
mm = merge master
ms = merge --skip
##########
pl = pull
plr = pull --rebase
plum = pull upstream master
prum = pull --rebase upstream master
##########
ps = push
pso = push origin
pst = push --tags
psom = push origin master
psot = push origin --tags
##########
s = stash
sa = "!f() { num=${1-0}; git stash apply stash@{$num}; }; f"
sl = stash list
sp = stash pop
sw = "!f() { num=${1-0}; git stash show -p stash@{$num}; }; f"
##########
ss = "!f() { git status -s | nl; }; f"
st = status
##########
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = "!f() { num=${1-0}; git rebase --interactive HEAD~$num; }; f"
rbs = rebase --skip
##########
r = remote
ra = remote add
rr = remote rm
rs = remote set-url
rv = remote -v
rw = remote show
##########
re = reset
rh = reset HEAD^
reh = reset --hard HEAD^
res = reset --soft HEAD^
undo = "!f() { git reset HEAD $(git status -s | cut -c4- | awk -v line=$1 'NR==line'); }; f"
##########
h = rev-parse HEAD
hs = "!f() { num=${1-0}; git rev-parse HEAD~$num; }; f"
##########
w = show
wn = "!f() { num=${1-0}; git show $(git rev-parse HEAD~$num); }; f"
##########
e = "!f() { $EDITOR $(git status -s | cut -c4- | awk -v line=${1-1} 'NR==line'); }; f"
##########