Last active
August 29, 2015 14:06
-
-
Save rfadams/54ae687efdddc74c60a8 to your computer and use it in GitHub Desktop.
Basic Git / Rvm bash_profile
This file contains 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
## 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