-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathalias.gitconfig
More file actions
100 lines (84 loc) · 2.59 KB
/
alias.gitconfig
File metadata and controls
100 lines (84 loc) · 2.59 KB
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
# Copy these aliases to your .gitconfig
# or alternatively add this
# [include]
# path = /path/to/this/file/alias.gitconfig
[alias]
# some shortcuts here reference custom commands
# see: https://github.com/ibaguio/git-helpers
s = status
ss = status -s
a = add
# add-staged is a custom command
ap = add -p
as = add-staged
asp = add-staged -p
au = add -u # add all unstaged
aup = add -u -p # add & pick unstaged
mff = merge --ff-only
mom = merge origin/master
# push
po = push origin
pof = push origin -f
pom = push origin master
posu = push-set-upstream # custom command
# cherry pick
cp = cherry-pick
cpc = cherry-pick --continue
cpa = cherry-pick --abort
# branch
br = branch
ba = branch -a
del = branch -D
gb = get-branch # custom command - searches for a branch
su = set-upstream # custom command - set's the upstream of the current branch
# commit
ci = commit
conm = commit -n -m
# diffs
d = diff --word-diff
dc = diff --cached
co = checkout-x # checkout with auto finding
cob = checkout -b
cow = checkout-worktree # checkout branch in a dedicated worktree dir
drop = checkout -- . # undo all unstaged changes
tagcommit = rev-list -n 1
fp = fetch -p --tags -f
rh = reset HEAD
rs = reset --soft
rsh = reset --soft HEAD~1 # undo last commit in HEAD
pff = pull --ff-only
# list files
lm = list-modified
lum = list-unmerged
# rebase
ri = rebase -i
rbc = rebase --continue
rba = rebase --abort
rom = rebase origin/master
romi = rebase origin/master -i
rori = rebase origin/release -i
rodi = rebase origin/develop -i
rirm = rebase -i --rebase-merges
# fixup is a custom command
fup = fixup
fupr = fixup -r
# file log
lgb = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative --branches
lgp = log --pretty=format:"%h%x09%ad%x09%an%x09%x09%s"
fl = log -u
# diff last commit
dlc = diff --cached HEAD^
# list all aliases
la = "!git config -l | grep alias | cut -c 7-"
# stash operations
sl = stash list
sa = stash apply
ss = stash save
sp = stash pop
ssp = stash show -p # shows the contents of the stash
sdrop = stash drop
mirror = push --mirror
wl = worktree list
[rebase]
autoSquash = true
autoStash = true