-
Notifications
You must be signed in to change notification settings - Fork 1
/
.aliases
206 lines (204 loc) · 7.38 KB
/
.aliases
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
#! /bin/zsh
export BIN=/usr/local/bin
alias gCa='git add $(gCl)'
alias gCe='git mergetool $(gCl)'
alias gCl='git --no-pager diff --name-only --diff-filter=U'
alias gCo='git checkout --ours --'
alias gCt='git checkout --theirs --'
alias gFb='git flow bugfix'
alias gFbc='git flow bugfix checkout'
alias gFbd='git flow bugfix diff'
alias gFbf='git flow bugfix finish'
alias gFbl='git flow bugfix list'
alias gFbm='git flow bugfix pull'
alias gFbp='git flow bugfix publish'
alias gFbr='git flow bugfix rebase'
alias gFbs='git flow bugfix start'
alias gFbt='git flow bugfix track'
alias gFbx='git flow bugfix delete'
alias gFf='git flow feature'
alias gFfc='git flow feature checkout'
alias gFfd='git flow feature diff'
alias gFff='git flow feature finish'
alias gFfl='git flow feature list'
alias gFfm='git flow feature pull'
alias gFfp='git flow feature publish'
alias gFfr='git flow feature rebase'
alias gFfs='git flow feature start'
alias gFft='git flow feature track'
alias gFfx='git flow feature delete'
alias gFh='git flow hotfix'
alias gFhc='git flow hotfix checkout'
alias gFhd='git flow hotfix diff'
alias gFhf='git flow hotfix finish'
alias gFhl='git flow hotfix list'
alias gFhm='git flow hotfix pull'
alias gFhp='git flow hotfix publish'
alias gFhr='git flow hotfix rebase'
alias gFhs='git flow hotfix start'
alias gFht='git flow hotfix track'
alias gFhx='git flow hotfix delete'
alias gFi='git flow init'
alias gFl='git flow release'
alias gFlc='git flow release checkout'
alias gFld='git flow release diff'
alias gFlf='git flow release finish'
alias gFll='git flow release list'
alias gFlm='git flow release pull'
alias gFlp='git flow release publish'
alias gFlr='git flow release rebase'
alias gFls='git flow release start'
alias gFlt='git flow release track'
alias gFlx='git flow release delete'
alias gFs='git flow support'
alias gFsc='git flow support checkout'
alias gFsd='git flow support diff'
alias gFsf='git flow support finish'
alias gFsl='git flow support list'
alias gFsm='git flow support pull'
alias gFsp='git flow support publish'
alias gFsr='git flow support rebase'
alias gFss='git flow support start'
alias gFst='git flow support track'
alias gFsx='git flow support delete'
alias gR='git remote'
alias gRa='git remote add'
alias gRl='git remote --verbose'
alias gRm='git remote rename'
alias gRp='git remote prune'
alias gRs='git remote show'
alias gRu='git remote update'
alias gRx='git remote rm'
alias gS='git submodule'
alias gSI='git submodule update --init --recursive'
alias gSa='git submodule add'
alias gSf='git submodule foreach'
alias gSi='git submodule init'
alias gSl='git submodule status'
alias gSs='git submodule sync'
alias gSu='git submodule foreach git pull origin master'
alias gb='git branch'
alias gbD='git branch --delete --force'
alias gbL='git branch --all --verbose'
alias gbM='git branch --move --force'
alias gbR='git branch --move --force'
alias gbS='git show-branch --all'
alias gbV='git branch --verbose --verbose'
alias gbX='git branch --delete --force'
alias gba='git branch --all --verbose'
alias gbc='git checkout -b'
alias gbd='git branch --delete'
alias gbl='git branch --verbose'
alias gbm='git branch --move'
alias gbr='git branch --move'
alias gbs='git show-branch'
alias gbv='git branch --verbose'
alias gbx='git branch --delete'
alias gc='git commit --verbose'
alias gcF='git commit --verbose --amend'
alias gcO='git checkout --patch'
alias gcP='git cherry-pick --no-commit'
alias gcR='git reset "HEAD^"'
alias gcS='git commit -S --verbose'
alias gcSF='git commit -S --verbose --amend'
alias gcSa='git commit -S --verbose --all'
alias gcSf='git commit -S --amend --reuse-message HEAD'
alias gcSm='git commit -S --message'
alias gca='git commit --verbose --all'
alias gcam='git commit --all --message'
alias gcf='git commit --amend --reuse-message HEAD'
alias gcm='git commit --message'
alias gco='git checkout'
alias gcp='git cherry-pick --ff'
alias gcr='git revert'
alias gcs='git show'
alias gd='git ls-files'
alias gdc='git ls-files --cached'
alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"'
alias gdk='git ls-files --killed'
alias gdm='git ls-files --modified'
alias gdu='git ls-files --other --exclude-standard'
alias gdx='git ls-files --deleted'
alias gf='git fetch'
alias gfa='git fetch --all'
alias gfc='git clone'
alias gfcr='git clone --recurse-submodules'
alias gfm='git pull'
alias gfr='git pull --rebase'
alias gfrm='git pull --rebase origin $(git symbolic-ref refs/remotes/origin/HEAD | xargs basename)'
alias gg='git grep'
alias ggL='git grep --files-without-matches'
alias ggi='git grep --ignore-case'
alias ggl='git grep --files-with-matches'
alias ggv='git grep --invert-match'
alias ggw='git grep --word-regexp'
alias giA='git add --patch'
alias giD='git diff --no-ext-diff --cached --word-diff'
alias giI='git update-index --no-assume-unchanged'
alias giR='git reset --patch'
alias giX='git rm -rf --cached'
alias gia='git add'
alias gid='git diff --no-ext-diff --cached'
alias gii='git update-index --assume-unchanged'
alias gir='git reset'
alias gitset='git push --set-upstream'
alias giu='git add --update'
alias gix='git rm -r --cached'
alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
alias glc='git shortlog --summary --numbered'
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"'
alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"'
alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
alias gm='git merge'
alias gmC='git merge --no-commit'
alias gmF='git merge --no-ff'
alias gma='git merge --abort'
alias gmt='git mergetool'
alias gp='git push'
alias gpA='git push --all && git push --tags'
alias gpF='git push --force'
alias gpa='git push --all'
alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"'
alias gpf='git push --force-with-lease'
alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"'
alias gpt='git push --tags'
alias gr='git rebase'
alias gra='git rebase --abort'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias grs='git rebase --skip'
alias gs='git stash'
alias gsS='git stash save --patch --no-keep-index'
alias gsa='git stash apply'
alias gsd='git stash show --patch --stat'
alias gsl='git stash list'
alias gsp='git stash pop'
alias gss='git stash save --include-untracked'
alias gsw='git stash save --include-untracked --keep-index'
alias gsx='git stash drop'
alias gwC='git clean -f'
alias gwD='git diff --no-ext-diff --word-diff'
alias gwR='git reset --hard'
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
alias gwX='git rm -rf'
alias gwc='git clean -n'
alias gwd='git diff --no-ext-diff'
alias gwr='git reset --soft'
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
alias gwx='git rm -r'
alias docker_stop_all='$BIN/docker stop $(docker ps -aq)'
alias wiki='$BIN/nvim $HOME/vimwiki/index.wiki'
alias n='$BIN/nnn'
alias lock='/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend'
rails_cmd () {
if [ -f "dev.yml" ]; then
echo "[info] dev.yml found, using dev environment."
dev $@
else
echo "[info] using bundler."
bundle exec rails $@
fi
}
alias r=rails_cmd