Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
The terminal aliases and functions I somewhat regularly use (gist for easy use when pairing)
# Rails
alias sc='bundle exec rails console'
alias ss="bundle exec rails server"
alias rs='rake spec'
alias rsu='rake spec:unit'
alias rsua='rake spec:unit:all'
alias rsa='rake spec:all'
alias mig='rake db:migrate'
alias rsp='rake testbot:spec'
alias ref='script/refresh'
# Git
alias gl="git pull --rebase"
alias gs="git status"
alias gst="git status"
alias ga='git add'
alias gcac="git commit -a -m 'Cleanup'"
alias gam="git commit --amend"
alias gco="git checkout"
alias gb="git checkout -b --color"
alias gba='git branch -a --color'
alias gp='git push'
alias gps='git stash && gpp && git stash pop'
alias gpp='git pull --rebase && git push'
alias stats='git shortlog -s -n'
alias emptycommit='git commit --allow-empty -v'
# "git commit all"
# Commits all changes, deletions and additions.
# When given an argument, uses that for a message.
# With no argument, opens an editor that also shows the diff (-v).
function gca {
git add --all && (
if [ -z "$1" ]; then
git commit -v
git commit -m "$1"
alias online="ping -c 1 &> /dev/null && echo 'Online :)' || echo 'Offline :('"
alias v="vagrant"
alias ta='tmux attach'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment