Skip to content

Instantly share code, notes, and snippets.

@eddie-knight
Last active May 11, 2020 16:47
Show Gist options
  • Save eddie-knight/29e3e21d6cfb6db961f5c2d944af2475 to your computer and use it in GitHub Desktop.
Save eddie-knight/29e3e21d6cfb6db961f5c2d944af2475 to your computer and use it in GitHub Desktop.
Helpful Aliases
source ~/.profile
# Docker
# Simply use 'dka' to stop and delete all containers and images
alias dka='dkc;dki;dkv'
alias dkc='docker ps -aq | xargs docker rm -f'
alias dki='docker images -aq | xargs docker rmi -f'
alias dkv='docker volume ls -qf dangling=true | xargs docker volume rm'
# Git
alias gs='git status'
alias ga='git add'
alias gcm='git commit -m'
alias gc='git checkout'
alias gpo='git push origin'
# Delete every branch except master (locally only)
alias xgbr="git branch | grep -v 'master' | xargs git branch -D"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment