Last active
August 29, 2015 14:02
-
-
Save Moosh-be/7e2c78e25fc7db0aeb8c to your computer and use it in GitHub Desktop.
git prompt (inspiré de http://www.git-attitude.fr/2013/05/22/prompt-git-qui-dechire/)
This file contains 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
1° sudo apt-get install git-core | |
2° dans .bashrc ajouter $(__git_ps1) dans le prompt, et setter quelques variables |
This file contains 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
export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 | |
export GIT_PS1_SHOWUPSTREAM=verbose GIT_PS1_DESCRIBE_STYLE=branch GIT_PS1_SHOWCOLORHINTS=1 | |
alias gitpromptlegend='echo -e *\\t: modifs locale\\n+\\t: dans index\\n$\\t: stash\\n%\\t: untracked\\n\<\\t: en retard\\n\>\\t: en avance\\n=\\t:synchro\\n\<\>\\t: divergé' | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$(__git_ps1) \[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1) \$ ' | |
fi | |
unset color_prompt force_color_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
--> https://gist.github.com/messenjer/78e9c0f7b249a9e4d1b5