-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy path__git.init.fish
More file actions
211 lines (200 loc) · 10.8 KB
/
Copy path__git.init.fish
File metadata and controls
211 lines (200 loc) · 10.8 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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
function __git.init
function __git.create_abbr -d "Create Git plugin abbreviation"
set -l name $argv[1]
set -l body $argv[2..-1]
# TODO: global scope abbr will be default in fish 3.6.0
abbr -a -g $name $body
end
# Provide a smooth transition from universal to global abbreviations by
# deleting the old univeral ones. Can be removed after fish 3.6 is in
# wide-spread use, i.e. 2024. __git.destroy should also be removed
# at the same time.
if set -q __git_plugin_initialized
__git.destroy
end
# git abbreviations
__git.create_abbr g git
__git.create_abbr ga git add
__git.create_abbr gaa git add --all
__git.create_abbr gau git add --update
__git.create_abbr gapa git add --patch
__git.create_abbr gap git apply
__git.create_abbr gb git branch -vv
__git.create_abbr gba git branch -a -v
__git.create_abbr gban git branch -a -v --no-merged
__git.create_abbr gbd git branch -d
__git.create_abbr gbD git branch -D
__git.create_abbr ggsup git branch --set-upstream-to=origin/\(__git.current_branch\)
__git.create_abbr gbl git blame -b -w
__git.create_abbr gbs git bisect
__git.create_abbr gbsb git bisect bad
__git.create_abbr gbsg git bisect good
__git.create_abbr gbsr git bisect reset
__git.create_abbr gbss git bisect start
__git.create_abbr gc git commit -v
__git.create_abbr gc! git commit -v --amend
__git.create_abbr gcn! git commit -v --no-edit --amend
__git.create_abbr gca git commit -v -a
__git.create_abbr gca! git commit -v -a --amend
__git.create_abbr gcan! git commit -v -a --no-edit --amend
__git.create_abbr gcv git commit -v --no-verify
__git.create_abbr gcav git commit -a -v --no-verify
__git.create_abbr gcav! git commit -a -v --no-verify --amend
__git.create_abbr gcm git commit -m
__git.create_abbr gcam git commit -a -m
__git.create_abbr gcs git commit -S
__git.create_abbr gcs! git commit -S --amend
__git.create_abbr gscam git commit -S -a -m
__git.create_abbr gcfx git commit --fixup
__git.create_abbr gcf git config --list
__git.create_abbr gcl git clone
__git.create_abbr gclean git clean -di
__git.create_abbr gclean! git clean -dfx
__git.create_abbr gclean!! "git reset --hard; and git clean -dfx"
__git.create_abbr gcount git shortlog -sn
__git.create_abbr gcp git cherry-pick
__git.create_abbr gcpa git cherry-pick --abort
__git.create_abbr gcpc git cherry-pick --continue
__git.create_abbr gd git diff
__git.create_abbr gdca git diff --cached
__git.create_abbr gds git diff --stat
__git.create_abbr gdsc git diff --stat --cached
__git.create_abbr gdt git diff-tree --no-commit-id --name-only -r
__git.create_abbr gdw git diff --word-diff
__git.create_abbr gdwc git diff --word-diff --cached
__git.create_abbr gdto git difftool
__git.create_abbr gdg git diff --no-ext-diff
__git.create_abbr gignore git update-index --assume-unchanged
__git.create_abbr gf git fetch
__git.create_abbr gfa git fetch --all --prune
__git.create_abbr gfm "git fetch origin (__git.default_branch) --prune; and git merge FETCH_HEAD"
__git.create_abbr gfo git fetch origin
__git.create_abbr gl git pull
__git.create_abbr ggl git pull origin \(__git.current_branch\)
__git.create_abbr gll git pull origin
__git.create_abbr glr git pull --rebase
__git.create_abbr glg git log --stat
__git.create_abbr glgg git log --graph
__git.create_abbr glgga git log --graph --decorate --all
__git.create_abbr glo git log --oneline --decorate --color
__git.create_abbr glog git log --oneline --decorate --color --graph
__git.create_abbr gloga git log --oneline --decorate --color --graph --all
__git.create_abbr glom git log --oneline --decorate --color \(__git.default_branch\)..
__git.create_abbr glod git log --oneline --decorate --color develop..
__git.create_abbr gloo "git log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' --date=short"
__git.create_abbr gm git merge
__git.create_abbr gma git merge --abort
__git.create_abbr gmt git mergetool --no-prompt
__git.create_abbr gmom git merge origin/\(__git.default_branch\)
__git.create_abbr gp git push
__git.create_abbr gp! git push --force-with-lease
__git.create_abbr gpo git push origin
__git.create_abbr gpo! git push --force-with-lease origin
__git.create_abbr gpv git push --no-verify
__git.create_abbr gpv! git push --no-verify --force-with-lease
__git.create_abbr ggp git push origin \(__git.current_branch\)
__git.create_abbr ggp! git push origin \(__git.current_branch\) --force-with-lease
__git.create_abbr gpu git push origin \(__git.current_branch\) --set-upstream
__git.create_abbr gpoat "git push origin --all; and git push origin --tags"
__git.create_abbr ggpnp "git pull origin (__git.current_branch); and git push origin (__git.current_branch)"
__git.create_abbr gr git remote -vv
__git.create_abbr gra git remote add
__git.create_abbr grb git rebase
__git.create_abbr grba git rebase --abort
__git.create_abbr grbc git rebase --continue
__git.create_abbr grbi git rebase --interactive
__git.create_abbr grbm git rebase \(__git.default_branch\)
__git.create_abbr grbmi git rebase \(__git.default_branch\) --interactive
__git.create_abbr grbmia git rebase \(__git.default_branch\) --interactive --autosquash
__git.create_abbr grbom "git fetch origin (__git.default_branch); and git rebase FETCH_HEAD"
__git.create_abbr grbomi "git fetch origin (__git.default_branch); and git rebase FETCH_HEAD --interactive"
__git.create_abbr grbomia "git fetch origin (__git.default_branch); and git rebase FETCH_HEAD --interactive --autosquash"
__git.create_abbr grbd git rebase develop
__git.create_abbr grbdi git rebase develop --interactive
__git.create_abbr grbdia git rebase develop --interactive --autosquash
__git.create_abbr grbs git rebase --skip
__git.create_abbr ggu git pull --rebase origin \(__git.current_branch\)
__git.create_abbr grev git revert
__git.create_abbr grh git reset
__git.create_abbr grhh git reset --hard
__git.create_abbr grhpa git reset --patch
__git.create_abbr grm git rm
__git.create_abbr grmc git rm --cached
__git.create_abbr grmv git remote rename
__git.create_abbr grpo git remote prune origin
__git.create_abbr grrm git remote remove
__git.create_abbr grs git restore
__git.create_abbr grset git remote set-url
__git.create_abbr grss git restore --source
__git.create_abbr grst git restore --staged
__git.create_abbr grup git remote update
__git.create_abbr grv git remote -v
__git.create_abbr gsh git show
__git.create_abbr gsd git svn dcommit
__git.create_abbr gsr git svn rebase
__git.create_abbr gsb git status -sb
__git.create_abbr gss git status -s
__git.create_abbr gst git status
__git.create_abbr gsta git stash
__git.create_abbr gstd git stash drop
__git.create_abbr gstl git stash list
__git.create_abbr gstp git stash pop
__git.create_abbr gsts git stash show --text
__git.create_abbr gsu git submodule update
__git.create_abbr gsur git submodule update --recursive
__git.create_abbr gsuri git submodule update --recursive --init
__git.create_abbr gts git tag -s
__git.create_abbr gtv git tag | sort -V
__git.create_abbr gsw git switch
__git.create_abbr gswc git switch --create
__git.create_abbr gunignore git update-index --no-assume-unchanged
__git.create_abbr gup git pull --rebase
__git.create_abbr gpr git pull --rebase
__git.create_abbr gupv git pull --rebase -v
__git.create_abbr gprv git pull --rebase -v
__git.create_abbr gupa git pull --rebase --autostash
__git.create_abbr gpra git pull --rebase --autostash
__git.create_abbr gupav git pull --rebase --autostash -v
__git.create_abbr gprav git pull --rebase --autostash -v
__git.create_abbr gprom git pull --rebase origin \(__git.default_branch\)
__git.create_abbr gpromi git pull --rebase=interactive origin \(__git.default_branch\)
__git.create_abbr gprum git pull --rebase upstream \(__git.default_branch\)
__git.create_abbr gprumi git pull --rebase=interactive upstream \(__git.default_branch\)
__git.create_abbr gwch git log -p --abbrev-commit --pretty=medium --raw --no-merges
# git checkout abbreviations
__git.create_abbr gco git checkout
__git.create_abbr gcb git checkout -b
__git.create_abbr gcod git checkout \(__git.develop_branch\)
__git.create_abbr gcom git checkout \(__git.default_branch\)
# git flow abbreviations
__git.create_abbr gfb git flow bugfix
__git.create_abbr gff git flow feature
__git.create_abbr gfr git flow release
__git.create_abbr gfh git flow hotfix
__git.create_abbr gfs git flow support
__git.create_abbr gfbs git flow bugfix start
__git.create_abbr gffs git flow feature start
__git.create_abbr gfrs git flow release start
__git.create_abbr gfhs git flow hotfix start
__git.create_abbr gfss git flow support start
__git.create_abbr gfbt git flow bugfix track
__git.create_abbr gfft git flow feature track
__git.create_abbr gfrt git flow release track
__git.create_abbr gfht git flow hotfix track
__git.create_abbr gfst git flow support track
__git.create_abbr gfp git flow publish
# git worktree abbreviations
__git.create_abbr gwt git worktree
__git.create_abbr gwta git worktree add
__git.create_abbr gwtls git worktree list
__git.create_abbr gwtlo git worktree lock
__git.create_abbr gwtmv git worktree move
__git.create_abbr gwtpr git worktree prune
__git.create_abbr gwtrm git worktree remove
__git.create_abbr gwtulo git worktree unlock
# GitLab push options
__git.create_abbr gmr git push origin \(__git.current_branch\) --set-upstream -o merge_request.create
__git.create_abbr gmwps git push origin \(__git.current_branch\) --set-upstream -o merge_request.create -o merge_request.merge_when_pipeline_succeeds
# Cleanup declared functions
functions -e __git.create_abbr
end