-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
114 lines (94 loc) · 2.48 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
#
# gitconfig
#
# ini for git
#
[user]
name = custompro98
email = mitchjoa@gmail.com
[includeIf "gitdir:~/apps/company/"]
path = ~/.gitconfig-company
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[core]
excludesfile = ~/.gitignore
editor = nvim
[alias]
# basic command shortcuts
st = status
co = checkout
br = branch
fp = format-patch
rmt = remote
# add shortcuts
a = add
ap = add --patch
ai = add --interactive
# commit shortcuts
ci = commit
cm = commit -m
cmn = commit -m --no-verify
ca = commit --amend
can = commit --amend --no-verify
ce = commit --allow-empty -m "Empty-Commit"
# push shortcust
fp = push --force-with-lease
# diff shortcuts
d = diff --patience
dw = diff --patience --ignore-all-space
dc = diff --patience --cached
dcw = diff --patience --cached --ignore-all-space
d1 = diff --patience HEAD~1
d2 = diff --patience HEAD~2
d3 = diff --patience HEAD~3
ds = diff --ignore-all-space
# reset shortcuts
rss = reset --soft
rsm = reset --mixed
rsh = reset --hard
# rebase shortcuts
rb = rebase
rba = rebase --abort
rbi = rebase --interactive
rbc = rebase --continue
prb = pull --rebase
# stash shortcuts
sh = stash --keep-index
sha = stash
shp = stash pop
# checkout shortcuts
ours = checkout --ours
theirs = checkout --theirs
clear = checkout -- .
# log shortcuts
lgo = log --graph --oneline --decorate
lgp = log --patch
lgs = log --stat
tree = log --oneline --decorate --graph --all
# analytics
who = shortlog -s --
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author =\"$1\"' -"
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
# misc
spsp = "!sh -c 'git stash; git pull --rebase $@; git stash pop'"
tidy = "!f() { \
local branch="${1-main}"; \
echo "Pruning branches that are already merged into $branch..."; \
git remote prune origin && git branch --merged "$branch" | grep --color=auto --exclude-dir={.bzr,.cvs,.git,.hg,.svn} -v " $branch" | xargs -n 1 git branch -d; \
}; f"
# config
whoami = config user.email
# Local Variables:
# mode: conf-unix
# End:
[push]
default = current
[url "git@github.com:"]
insteadOf = https://github.com
[init]
defaultBranch = main