Created
July 30, 2010 09:01
-
-
Save valakirka/500191 to your computer and use it in GitHub Desktop.
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
# In your .bash_profile or .bashrc | |
# show active git branch in prompt | |
git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
} | |
# customize the prompt variable | |
export PS1="\u@\h:\w \$(git_branch)$ " | |
# This shows a prompt like this one :) | |
# valakirka@miskatonic:~/Projects/monquartier (master) $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment