Skip to content

Instantly share code, notes, and snippets.

@stanographer
Created August 26, 2019 03:53
Show Gist options
  • Save stanographer/992282b1f1345724021551419b3d1c7a to your computer and use it in GitHub Desktop.
Save stanographer/992282b1f1345724021551419b3d1c7a to your computer and use it in GitHub Desktop.
Common shortcuts
# Github
alias g="git"
alias gs="git status"
alias ga="git add"
alias gaa="git add -A"
alias ga.="git add ."
alias gb="git branch"
alias gca="git commit -a -m"
alias gcmm="git commit -m"
alias gc="git clone"
alias gco="git checkout"
alias glp="git log --pretty=oneline"
alias ggg="git add . && git commit -m 'standard' && git push"
alias gd="git diff"
alias gp="git push"
alias master="git checkout master"
alias gpom="git push origin master"
alias gphm="git push heroku master"
alias gitfix="git rm -r --cached . && git add . && git commit -m '.gitignore fix'" # untrack files already added to repo
# .notfiles mgmt
alias config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME"
alias trash="rmtrash" #https://apple.stackexchange.com/a/17637
alias ccc="pbcopy <"
alias ppp="pbpaste"
alias c="clear"
# howdoi w common options
alias h='function hdi(){ howdoi $* -c -n 5; }; hdi'
# npm
alias npmg="npm i -g"
alias npmis="npm i --save"
alias npmid-"npm i --save-dev"
alias npmv="npm -v"
alias npmst="npm start"
alias npmt="npm test"
alias npmr="npm run"
alias npmp="npm publish"
alias npmi="npm init"
alias npmup="npm install -g npm"
alias npmuns="npm uninstall --save"
alias npmund="npm uninstall --save-dev"
# Navigation
alias ..="cd .."
alias dh="cd ~"
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias dr="cd ~/Developer"
alias ld="ls -ld" # Show info about the directory
alias lla="ls -lAF" # Show hidden all files
alias ll="ls -lF" # Show long file information
alias la="ls -AF" # Show hidden files
alias lx="ls -lXB" # Sort by extension
alias lk="ls -lSr" # Sort by size, biggest last
alias lc="ls -ltcr" # Sort by and show change time, most recent last
alias lu="ls -ltur" # Sort by and show access time, most recent last
alias lt="ls -ltr" # Sort by date, most recent last
alias lr="ls -lR" # Recursive ls
# Print each PATH entry on a separate line
alias path='echo -e ${PATH//:/\\n}'
# Google Chrome
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
# Spotify controls
alias s='spotify'
alias play='spotify play'
alias pause='spotify pause'
alias next='spotify next'
alias prev='spotify prev'
alias again='spotify replay'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment