Created
August 26, 2015 03:11
-
-
Save afenix/0de0763b0e5dfb336280 to your computer and use it in GitHub Desktop.
bash_profile with Git shortcuts and colors added
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
# Enable tab completion | |
source ~/git-completion.bash | |
# colors! | |
green="\[\033[0;32m\]" | |
blue="\[\033[0;34m\]" | |
purple="\[\033[0;35m\]" | |
reset="\[\033[0m\]" | |
# Change command prompt | |
source ~/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
# '\u' adds the name of the current user to the prompt | |
# '\$(__git_ps1)' adds git-related stuff | |
# '\W' adds the name of the current directory | |
export PS1="$purple\u$green\$(__git_ps1)$blue \W $ $reset" | |
alias ga='git add' | |
alias gp='git push' | |
alias gl='git log' | |
alias gs='git status' | |
alias gd='git diff' | |
alias gm='git commit -m' | |
alias gma='git commit -am' | |
alias gb='git branch' | |
alias gc='git checkout' | |
alias gra='git remote add' | |
alias grr='git remote rm' | |
alias gpu='git pull' | |
alias gcl='git clone' | |
alias subl="/Applications/Sublime\ Text\ 3.app/Contents/SharedSupport/bin/subl" | |
export PATH=~/bin:/usr/local/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment