Skip to content

Instantly share code, notes, and snippets.

@pensierinmusica
Last active December 20, 2015 05:49
Show Gist options
  • Save pensierinmusica/6081789 to your computer and use it in GitHub Desktop.
Save pensierinmusica/6081789 to your computer and use it in GitHub Desktop.
My bash profile
# Original version
PATH="/usr/local/sbin:${PATH}"
export PATH
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Make global packages available to Node
export NODE_PATH="/usr/local/lib/node_modules"
# Enable colors in Terminal
export CLICOLOR=1
# Enable Git auto-complete
source ~/.git-completion.bash
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
# Autojump
[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh
## User defined aliases ##
alias ba='bash'
alias g='git'
alias sub='sublime'
# Remote connections
# Git specific
alias gs='git status'
alias gl='git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
alias gd='git diff'
alias gc='git commit'
alias go='git checkout'
alias ga='git add'
alias gp='git pull --rebase'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment