Created
May 28, 2015 08:01
-
-
Save joakimk/4f0f03be53c5f2783e29 to your computer and use it in GitHub Desktop.
The terminal aliases and functions I somewhat regularly use (gist for easy use when pairing)
This file contains hidden or 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
# 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 | |
else | |
git commit -m "$1" | |
fi) | |
} | |
alias online="ping -c 1 www.sunet.se &> /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