-
Notifications
You must be signed in to change notification settings - Fork 1
/
gitconfig
134 lines (123 loc) · 3.04 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
125
126
127
128
129
130
131
132
133
134
[user]
name = "Leonardo Godoy"
email = "[email protected]"
username = "L30Bola"
signingkey = CFF266C3E04E6AD6
[core]
editor = vim
pager = "delta"
[web]
browser = google-chrome-stable
[commit]
gpgSign = true
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
light = false
pager = less
line-numbers = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[url "[email protected]:"]
insteadOf = https://git.topfreegames.com/
insteadOf = https://git.topfreegames.com:443/
insteadOf = http://git.topfreegames.com/
insteadOf = http://git.topfreegames.com:80/
insteadOf = git::http://git.topfreegames.com/
insteadOf = http://[email protected]/
[includeIf "gitdir:~/projetos/"]
path = ~/.vim/gitconfigs/wls
[includeIf "gitdir:/srv/godoy/projetos/"]
path = ~/.vim/gitconfigs/wls
[includeIf "gitdir:~/ghorg/"]
path = ~/.vim/gitconfigs/wls
[includeIf "gitdir:~/projetos/local/"]
path = ~/.vim/gitconfigs/wls
[includeIf "gitdir:~/scripts"]
path = ~/.vim/gitconfigs/wls
[alias]
com = "!com() { \
local main_branch; \
main_branch=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p'); \
git checkout ${main_branch}; \
}; com"
k = "!k() { \
set +x; \
git com; \
git pu; \
set -x; \
}; k"
mm = "!mm() { \
set +x; \
local main_branch; \
main_branch=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p'); \
git merge --ff ${main_branch}; \
set -x; \
}; mm"
n = "!n() { \
set +x; \
local last_branch; \
last_branch=$(git rev-parse --abbrev-ref HEAD); \
local main_branch; \
main_branch=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p'); \
git k; \
git checkout ${last_branch}; \
git merge ${main_branch}; \
set -x; \
}; n"
pou = "!pou() { \
set +x; \
local actual_branch; \
actual_branch=$(git rev-parse --abbrev-ref HEAD); \
git p -u origin ${actual_branch}; \
set -x; \
}; pou"
pp = "!pp() { \
set +x; \
local commit_message; \
commit_message=$(git pou 2>&1); \
echo \"$commit_message\"; \
local url; \
url=$(grep -A1 'To create a merge request for' <<< ${commit_message} | grep http | awk '{ print $2 }'); \
if [[ -z ${url} ]]; then \
url=$(grep -A1 'View merge request for' <<< ${commit_message} | grep http | awk '{ print $2 }'); \
fi; \
xdg-open ${url} | cat; \
set -x; \
}; pp"
stk = "!stk() { \
set +x; \
git st; \
git k; \
git st pop; \
}; stk"
a = "add"
b = "branch"
c = "commit"
cl = "clone"
cp = "cherry-pick"
co = "checkout"
d = "diff"
f = "fetch"
i = "update-index --skip-worktree"
ix = "update-index --no-skip-worktree"
l = "log"
m = "merge"
p = "push"
pu = "pull --rebase"
r = "rebase"
rh = "reset HEAD"
s = "status"
st = "stash"
t = "tag"
staged = "diff --name-only --staged"
unstaged = "diff --name-only"
untracked = "ls-files --other --exclude-standard"
ignored = "status --ignored"
[pull]
rebase = true
[init]
defaultBranch = master