Revisions
-
parndt revised this gist
May 6, 2011 . 1 changed file with 1 addition and 1 deletion.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 @@ -13,7 +13,7 @@ Then add the following to your `~/.bashrc` or `~/.bash_profile` after `PATH`: GIT_PS1_SHOWDIRTYSTATE=true GIT_PS1_SHOWSTASHSTATE=true GIT_PS1_SHOWUPSTREAM="auto" PS1='\t:\[\033[32m\]$(__git_ps1 " (%s)")\[\033[00m\] \W$ ' fi export PS1 -
parndt revised this gist
May 6, 2011 . 1 changed file with 3 additions and 3 deletions.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 @@ -5,15 +5,15 @@ Run the following to create `~/.git-completion.bash`: Then add the following to your `~/.bashrc` or `~/.bash_profile` after `PATH`: # Set the base PS1 export PS1="\t: \W$ " # Source the git bash completion file if [ -f ~/.git-completion.bash ]; then source ~/.git-completion.bash GIT_PS1_SHOWDIRTYSTATE=true GIT_PS1_SHOWSTASHSTATE=true GIT_PS1_SHOWUPSTREAM="auto" PS1='\t:\[\033[32m\]$(__git_ps1 " (%s)")\[\033[00m\]\W$ ' fi export PS1 -
mhaylock created this gist
May 6, 2011 .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,30 @@ Run the following to create `~/.git-completion.bash`: curl https://github.com/git/git/raw/master/contrib/completion/git-completion.bash > ~/.git-completion.bash Then add the following to your `~/.bashrc` or `~/.bash_profile` after `PATH`: # Set the base PS1 PS1="\h:\W \u\$ " # Source the git bash completion file if [ -f ~/.git-completion.bash ]; then source ~/.git-completion.bash GIT_PS1_SHOWDIRTYSTATE=true GIT_PS1_SHOWSTASHSTATE=true GIT_PS1_SHOWUPSTREAM="auto" PS1='\h:\[\033[32m\]$(__git_ps1 " (%s)")\[\033[00m\]\W \u\$ ' fi export PS1 This will display the branch name next to the folder name in the bash prompt. Symbols after the branch name indicate additional information about the repo state: * `*`: The branch has modifications * `$`: There are stashed changes * `=`: The branch is equal with the remote branch * `<`: The branch is behind the remote branch (can be fast-forwarded) * `>`: The branch is ahead of the remote branch (remote branch can be fast-forwarded) * `<>`: The branch and remote branch have diverged (will need merge)