-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaliases
58 lines (48 loc) · 1.86 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
function git_current_branch() {
ref=$(git symbolic-ref HEAD)
echo "${ref#refs/heads/}"
}
# Shell into a running docker container with dsh <CONTAINER_ID>
function dsh(){
docker exec -it "$@" /bin/bash
}
alias shack='sb ssh & ssh'
alias la="ls -Glha"
alias e="exa --icons -l"
alias hg="history -10000 -1 | grep --color=auto "
alias h="history -10000 -1"
# git
abbrev-alias gs='git status'
abbrev-alias ga='git add -A'
abbrev-alias gap='git add -p .'
abbrev-alias gb='git branch'
abbrev-alias gc='git commit'
abbrev-alias gr='git rebase'
abbrev-alias grm='git rebase main'
abbrev-alias grc='git rebase --continue'
abbrev-alias gca='git commit --amend -C HEAD'
abbrev-alias gd='git difftool'
abbrev-alias gco='git checkout'
abbrev-alias gp='git pull --rebase'
abbrev-alias gpf='git push --force-with-lease'
abbrev-alias gup='git fetch origin; git rebase origin/master'
abbrev-alias ggpush='git push -u origin $(git_current_branch)'
abbrev-alias undopush="git push -f origin HEAD^:master"
abbrev-alias glog='git log --format='\''%Cgreen%h%Creset %C(cyan)%an%Creset - %s - %C(yellow)%ar'\'' --graph'
abbrev-alias grb="git for-each-ref --sort=-committerdate --count=10 --format='%(refname:short)' refs/heads/"
abbrev-alias dc="docker-compose"
abbrev-alias d="docker"
abbrev-alias de="docker exec -it"
abbrev-alias dr="docker run -it"
alias removemerged='git branch --merged | egrep -v "(^\*|main|master|dev)" | xargs git branch -d'
alias ohcrap='git add -A .; git commit --amend -C HEAD; git push -f'
alias nv='nvm use'
alias ns='npm start'
alias nt='npm test'
alias nr='npm run'
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
alias p="cd ~/projects"
alias my="cd ~/my-projects"
alias dot="code ~/dotfiles"
alias pyserver="python -m SimpleHTTPServer"