- open terminal
cd ~
touch .bashrc
code .bashrc
- paste the following aliases and/or add your own
- Restart terminal
alias g='git'
alias gst='git status'
alias gl='git pull'
alias gp='git push'
alias gcam='git commit -a -m'
alias gcmsg='git commit -m'
alias gco='git checkout'
alias gcob="git checkout -b"
alias gcm='git checkout master'
alias gb='git branch'
alias ga='git add'
alias gaa='git add -A'
alias gm='git merge'
# hard reset
alias gclean='git reset --hard && git clean -df'
# add a name after this to make the stash memorable
alias gss='git stash save'
# list all stashes
alias gslist='git stash list'
#ddev aliases
alias export-db='ddev export-db --gzip=false --file=db.sql'
alias export-db-gzip='ddev export-db --file=db.sql.gz'
# delete the most recent stash
# unfortunately unable to pass parameter to delete a stash.
# manually do that with git stash drop stash@{1}
# where @{1} is the position in the stash list
alias gsdel='git stash drop'
# delete all stash entries
alias gsclear="git stash clear"
# nuke folders
alias nuke-vendor='rm -rf vendor/'
alias nuke-node='rm -rf node_modules/ && npm i'
# Retrieve current public IP address
alias myip='curl http://ipecho.net/plain; echo'
# Get rid of any, uncommmited, changes in repo
alias nah='git clean -fd && git reset --hard HEAD'