This is the first part of a series in which I'll document the various dotfiles I use to support my work, making it easier and more enjoyable.

I use Git and Rails every day at work. To stop my fingers wearing down I've created short aliases for the most common tasks I need to do.

Stick these in ~/.aliases.

# ~/.aliases
# Record how much I've used various Git commands:
alias git="git-achievements"

# Working with Git
alias g='git'
alias gs='git status'
alias gc='git commit'
alias gca='git commit -a'
alias ga='git add'
alias gco='git checkout'
alias gb='git branch'
alias gm='git merge'
alias gd="git diff"

# Working with Rails
alias s='script/server'
alias c='script/console'
alias m='rake db:migrate'
alias r='rake'

# Open the current directory in TextMate
alias e='mate .'

# Serve the contents of the current directory over HTTP
alias serve="ruby -rwebrick -e\"s = => 3000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start\""

Now source the aliases file from your ~/.profile to use them.

# ~/.profile
for I in aliases; do
  [ -f ~/.$I ] && . ~/.$I
written by
Disagree? Found a typo? Got a question?
If you'd like to have a conversation about this post, email I don't bite.
You can verify that I've written this post by following the verification instructions:
curl -LO
curl -LO
gpg --verify my-dot-files-dot-aliases.html.orig{.asc,}