Skip to content

Instantly share code, notes, and snippets.

@rfadams
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rfadams/54ae687efdddc74c60a8 to your computer and use it in GitHub Desktop.
Save rfadams/54ae687efdddc74c60a8 to your computer and use it in GitHub Desktop.
Basic Git / Rvm bash_profile
## Bash prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
PS1="$RED\$ \w$YELLOW \$(parse_git_branch)$GREEN\$ "
alias g='git'
alias ga='git add'
alias gs='git status'
alias gc='git checkout'
alias gcmt='git commit'
alias gb='git branch'
alias gd='git diff'
alias gf='git fetch'
alias gl='git log --oneline'
alias gll='git log --oneline -5'
alias be='bundle exec'
alias rmig='bundle exec rake db:migrate && bundle exec rake db:migrate RAILS_ENV=test'
alias pg='postgres -D /usr/local/var/postgres'
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment