Created
August 17, 2009 00:53
-
Star
(389)
You must be signed in to star a gist -
Fork
(72)
You must be signed in to fork a gist
Revisions
-
justintv created this gist
Aug 17, 2009 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " # This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! # ~/code/web:beta_directory$ git checkout master # Switched to branch "master" # ~/code/web:master$ git checkout beta_directory # Switched to branch "beta_directory" # ~/code/web:beta_directory$