Skip to content

Instantly share code, notes, and snippets.

@ww24
Created February 26, 2018 11:44
Show Gist options
  • Save ww24/fd1fad3092c70e5fb5e5c129b18fb262 to your computer and use it in GitHub Desktop.
Save ww24/fd1fad3092c70e5fb5e5c129b18fb262 to your computer and use it in GitHub Desktop.
Git や Docker を使う上で便利な aliases
# alias for git
alias git-bd='git branch -d $(git branch | while read l; do if [[ $l != \** ]] echo $l; done | peco)'
alias git-co='git checkout $(git branch | while read l; do if [[ $l != \** ]] echo $l; done | peco)'
alias git-fp='git push -u origin $(git symbolic-ref --short HEAD)'
# alias for docker
alias docker-rm-all='docker rm $(docker ps -q -f status=exited)'
alias docker-rmi-all='docker rmi $(docker images -q)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment