Developer Documentation: Bash Cheatsheet
Nanta Aditya on September 12, 2021
Prerequisites
- install Git and Git bash on your machine.
- edit
.bashrcfile - for example if you want to use
git fecth, just typegfon your terminal even though you don't have *lol
Git Cheatsheet
# ----------------------
# Git Command Aliases
# ----------------------
alias gf='git fetch'
alias gcb='git checkout -b'
alias ga='git add --all'
alias gs='git status'
alias gcm='git commit -m'
alias gb='git branch'
alias gt='git tag'
alias gpo='git push origin'
alias gpt='git push --tags origin'
Maven Cheatsheet
# ----------------------
# Maven Aliases
# ----------------------
alias mci='mvn clean install'
alias mi='mvn install'
alias mst='mvn install -DskipTests'
alias mv='mvn verify'
alias mcv='f() { mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$1; }; f'
alias mdm='mvn spring-boot:run -Dmode=create'
alias mrm='f() { mvn spring-boot:run -Drun.profiles=$1 -Dmode=migrate; }; f'
alias mrb='f() { mvn spring-boot:run -Drun.profiles=$1 -Dmode=rollback -Dversion=$2; }; f'
Postgres Cheatsheet
# ----------------------
# Postgres Aliases
# ----------------------
alias pr='pr() { psql -U postgres $1 < $2; }; pr'
alias pdb='pdb() { pg_dump -U $1 -h $2 -O -x > $3; }; pdb'
Docker Cheatsheet
# ----------------------
# DOCKER
# ----------------------
alias ds="docker start "
alias dst="docker stop "
alias dl="docker logs --tail=500 -f "
alias dcl="docker container ls"