-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathaliases
executable file
·52 lines (47 loc) · 1.73 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
#!/usr/bin/env bash
# git speed
alias gwd="git diff --no-ext-diff --patch-with-stat"
alias gwdc="gwd --cached"
alias gco="git checkout"
alias gws="git status --short"
alias gcm="git commit --message"
alias gcam="git commit --verbose --amend"
alias gcf="git commit --amend --reuse-message HEAD"
# git speed (more forbidden)
alias gmm="gco master; git pull; gco -; git merge master --no-edit"
alias grm="gco master; git pull; gco -; git rebase master"
alias grom="gco rebase origin/master"
alias gmmn="gco main; git pull; gco -; git merge main --no-edit"
alias grmn="gco main; git pull; gco -; git rebase main"
alias gromn="gco rebase origin/main"
# git current branch
alias gbc="git branch | grep \* | cut -d ' ' -f2"
# git branch set upstream
alias gbsu="git branch --set-upstream-to=origin/\$(gbc) \$(gbc)"
# git branch delete interactive
alias gbdi="git branch | fzf -m | xargs git branch -d"
# git branch delete interactive forcefully
alias gbDi="git branch | fzf -m | xargs git branch -D"
# git checkout branch interactive
alias gcoi="git branch | fzf -m | xargs git checkout"
# tmux
alias tn="tmux new -s ' '"
alias tns="tmux new -s"
alias tls="tmux ls"
alias ta="tmux a"
alias tks="tmux kill-session -t"
# misc
alias rg="rg --smart-case"
alias cls="clear; ls"
alias exs="source ~/.zshrc"
alias pyserv="python3 -m http.server"
alias psg="ps aux | head -n 1; ps aux | rg"
alias fix="git diff --name-only | uniq | xargs $EDITOR"
alias cmv="gcm \"\`node -e \"console.log(require('./package.json').version)\"\`\""
alias brewu="brew update; brew upgrade --force-bottle; brew cleanup --prune-prefix; brew doctor"
alias dns="sudo killall -hUP mDNSResponder"
# work util
alias s="script/server"
alias sup="script/update"
alias t="script/test"
alias n="git pull; sup; s"