Permalink
Browse files

Added .git_aliases and .rails_aliases

  • Loading branch information...
1 parent 48ea9a3 commit 88fb6c876c5df7d2a37ff7afaad728572a63b36c Randy Reddig committed Dec 21, 2009
Showing with 58 additions and 0 deletions.
  1. +8 −0 .bashrc
  2. +25 −0 .git_aliases
  3. +25 −0 .rails_aliases
View
@@ -224,6 +224,14 @@ alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
+if [ -f ~/.git_aliases ]; then
+ . ~/.git_aliases
+fi
+
+if [ -f ~/.rails_aliases ]; then
+ . ~/.rails_aliases
+fi
+
# ----------------------------------------------------------------------
# BASH COMPLETION
# ----------------------------------------------------------------------
View
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# ----------------------------------------------------------------------
+# GIT ALIASES / FUNCTIONS
+# ----------------------------------------------------------------------
+
+alias ch="git diff -M | mate"
+alias chc="git diff --cached -M | mate"
+alias grm="git status | grep 'deleted:' | sed -e 's/^#.deleted: *//' | xargs -n1 git rm"
+alias gum="git add-unmerged"
+alias gb='git branch -a -v'
+alias gci='git commit -v'
+alias gco='git checkout'
+alias gcb='git checkout -b'
+alias gcia='git commit -v -a'
+alias gs='git status'
+alias gch="git log ORIG_HEAD.. --stat --no-merges"
+
+function gco {
+ if [ -z "$1" ]; then
+ git checkout master
+ else
+ git checkout $1
+ fi
+}
View
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# ----------------------------------------------------------------------
+# RAILS ALIASES / COMMANDS
+# ----------------------------------------------------------------------
+
+alias sc="./script/console"
+alias sd="./script/dbconsole"
+alias ss="./script/server"
+
+function rlog {
+ if [ -z "$1" ]; then
+ tail -f -n80 ./log/development.log
+ else
+ tail -f -n80 ./log/$1.log
+ fi
+}
+
+function cuke {
+ if [ -z "$1" ]; then
+ rake cucumber
+ else
+ rake cucumber FEATURE=$1
+ fi
+}

0 comments on commit 88fb6c8

Please sign in to comment.