-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
149 lines (104 loc) · 3.61 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[user]
name = Sven Eberth
[core]
editor = vim
[pull]
rebase = true
[push]
autoSetupRemote = true
[init]
defaultBranch = main
[remotes]
my = upstream se
[alias]
# One letter alias for our most frequent commands.
a = add
b = branch
c = commit
d = diff
f = fetch
g = grep
l = log
m = merge
o = checkout
p = pull
r = remote
s = status
w = whatchanged
# Short aliases for our frequent commands.
aa = add -A
co = checkout
co- = checkout -
cob = checkout -b
### branch ###
# branch - edit the description
be = branch --edit-description
# branch and only list branches whose tips are reachable from the specified commit (HEAD if not specified).
bm = branch --merged
# branch and only list branches whose tips are not reachable from the specified commit (HEAD if not specified).
bnm = branch --no-merged
### diff ###
# diff - show changes not yet staged
dc = diff --cached
# diff - show changes about to be commited
ds = diff --staged
# diff - show changes but by word, not line
dw = diff --word-diff
# diff deep - show changes with our preferred options. Also aliased as `diff-deep`.
dd = diff --check --dirstat --find-copies --find-renames --histogram --color
### commit ###
# commit - amend the tip of the current branch rather than creating a new commit.
ca = commit --amend
# commit - amend the tip of the current branch, and edit the message.
cam = commit --amend --message
# commit - amend the tip of the current branch, and do not edit the message.
cane = commit --amend --no-edit
# commit interactive
ci = commit --interactive
# commit with a message
cm = commit --message
# commit and stage changed files
cc = commit -a
### log ###
# log with a text-based graphical representation of the commit history.
lg = log --graph
# log with one line per item.
lo = log --oneline
# log with patch generation.
lp = log --patch
# log with first parent, useful for team branch that only accepts pull requests
lfp = log --first-parent
# log with items appearing in topological order, i.e. descendant commits are shown before their parents.
lt = log --topo-order
# log like - we like this summarization our key performance indicators. Also aliased as `log-like`.
ll = log --graph --topo-order --abbrev-commit --date=short --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %Cblue%G?%Creset'
# get the short commit hash
ref = rev-parse --short HEAD
hash = ref
### pull ###
# pull if a merge can be resolved as a fast-forward, otherwise fail.
pf = pull --ff-only
pr = pull --rebase
pp = pull -p
pps = pull -p --autostash
### submodule ###
# submodule - enables foreign repositories to be embedded within a dedicated subdirectory of the source tree.
sm = submodule
# submodule init
smi = submodule init
# submodule add
sma = submodule add
# submodule sync
sms = submodule sync
# submodule update
smu = submodule update
# submodule update with initialize
smui = submodule update --init
# submodule update with initialize and recursive; this is useful to bring a submodule fully up to date.
smuir = submodule update --init --recursive
# submodule fetch from all remotes
sfa = submodule foreach git fetch --all
# tag always signed
tag = tag -s
# fetch from all remotes and prune local branches + tags
fp = fetch --prune --prune-tags --all