Last active
February 14, 2023 21:12
-
-
Save ltdev22/4c7a8d0d68cc7aa0085868d4732e6374 to your computer and use it in GitHub Desktop.
Useful aliases for commands I run in the terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terminal commands | |
alias ll="ls -lAFh" | |
alias c="clear" | |
alias bbd="brew bundle dump --force --describe" | |
alias trail='<<<${(F)path}' # output in a human friendly format the $PATH - works with single quotes this command | |
# Git | |
alias ga="git add" | |
alias gaa="git add ." | |
alias gcm="git commit -m" | |
alias gca="git commit --amend --no-edit" | |
alias gc="git checkout" | |
alias gcb="git checkout -b" | |
alias gcd="git checkout -d" | |
alias gdiff="git diff" | |
alias glog="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' | |
--abbrev-commit" | |
alias push="git push" | |
alias pull="git pull" | |
alias gs="git status" | |
alias gst="git stash" | |
alias nah="git reset --hard;git clean -df;" | |
# Docker | |
alias di="docker image" | |
alias dn="docker network" | |
alias dv="docker volume" | |
alias dpr="docker system prune --volumes" | |
alias dsa="docker stop $(docker ps -a -q)" | |
alias dc="docker-compose" | |
alias dcb="docker-compose build" | |
alias dcps="docker-compose ps" | |
alias dcup="docker-compose up" | |
alias dcupb="docker-compose up --build" | |
alias dcupd="docker-compose up -d" | |
alias dcstop="docker-compose stop" | |
alias dcdown="docker-compose down -v" | |
alias dcrun="docker-compose run --rm" | |
alias dcexec="docker-compose exec" | |
alias dlogs="docker-compose logs -f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the terminal:
touch ~/.aliases
nano ~/.zshrc
. ~/.aliases
into zshrc to import the aliases and savesource ~/.zshrc
or close and open again the terminal to apply the changes