-
-
Save FAST-JE/c62c8f43a7d63d7130e5fb46a23100a7 to your computer and use it in GitHub Desktop.
Revisions
-
joseluisq renamed this gist
Jun 24, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
joseluisq created this gist
Jun 24, 2015 .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,17 @@ # Add Git Branch Name to Terminal Prompt (Mac)  Open `~/.bash_profile` in your favorite editor and add the following content to the bottom. ```sh # Git branch in prompt. parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " ``` By MARTIN FITZPATRICK at http://martinfitzpatrick.name/article/add-git-branch-name-to-terminal-prompt-mac/