Permalink
Browse files

Some git aliases; new PS1

  • Loading branch information...
1 parent 30ab004 commit d16666f8f0ad2dee8d31a0d39f5e1dca20b30382 Marius Gawrisch committed Oct 31, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 .bashrc
View
14 .bashrc
@@ -15,11 +15,18 @@ alias beta="cd ~/Code/beta"
alias t="vim ~/t.md"
alias slot-machine="mail"
-alias gs="git status"
+alias gs="clear && git status"
alias gc="git commit"
alias gp="git push"
+alias gpl="git pull"
alias gb="git branch"
alias ga="git add"
+alias gm="git merge"
+alias gd="git diff"
+alias gr="git reset"
+alias grh="git reset --hard"
+alias gcl="git clean -df"
+alias gdc="git diff --cached"
alias gco="git checkout"
alias gl="git log --oneline --graph"
@@ -36,7 +43,6 @@ export EDITOR="vim"
# add /usr/local/sbin ?
PATH=$PATH:/usr/local/Cellar/ruby/1.9.3-p194/bin
PATH=$PATH:/usr/texbin
-PATH=$PATH:/Users/marius/bin
PATH="/usr/local/bin":$PATH
export PATH
@@ -46,6 +52,10 @@ export PATH
#PS1="MNML> "
#PS1="\w\$ "
+function parse_git_branch {
+ git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/'
+}
+export PS1="\h:\W\$(parse_git_branch)$ "
# dl.dropbox.com/u/13600509/file.txt
if [ -e /usr/local/etc/bash_completion.d/password-store ]

0 comments on commit d16666f

Please sign in to comment.