snippets with tag 'git'

Shell : afficher la branche GIT en cours dans votre prompt shell Ceci vous affichera un shell de ce style : ks12344876:~/django/KillerApp(newfeature) $
# a mettre dans  votre .bashrc

parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

export PS1="\h:\w\$(parse_git_branch) $ "
tags : system, bash, git

all tags : python, system, vlc, video, apache, proxy, linux, django, MySQL, .NET, XML, XSL, regexp, bat, windows, bash, git

back to snippets home
site réalisé et hébergé par revolunet © 2009 - informations légales