Created
December 10, 2010 15:25
-
-
Save senny/736331 to your computer and use it in GitHub Desktop.
Terminal Setup
This file contains hidden or 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
alias g='git' | |
alias gm='git merge' | |
alias gmf='git merge --ff-only' | |
alias gs='git status' | |
alias gl='git pull' | |
alias glr='git pull --rebase' | |
alias gf='git fetch' | |
alias gp='git push' | |
alias gd='git diff' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' | |
alias gb='git branch -v' | |
alias gba='git branch -a -v' | |
alias gcount='git shortlog -sn' | |
alias gcp='git cherry-pick' | |
alias glg='git log --stat --max-count=5' | |
alias gg='git log --graph' | |
alias gco='git checkout' | |
alias gsv='git svn' | |
alias gt='git tag' | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo '*' | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/" | |
} | |
export PS1='\[\033[1;32m\]\w\[\033[0m\] :: \[\033[1;33m\]($(parse_git_branch)\[\033[1;31m\]$(parse_git_dirty)\[\033[0m\]\[\033[1;33m\])\[\033[0m\] \[\033[0m\]\[\033[1;31m\]»\[\033[0m\] ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment