-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 8/21/2008 4:22 AM: > Maybe you can include the output of the command > git status 2>/dev/null | head -n 1 | sed -e 's/# On branch //' > in your bash prompt, as a constant reminder on which branch you are working? > Like this: > export PS1="[EMAIL PROTECTED]:\\w \$(git status 2>/dev/null | head -n 1 | > sed -e 's/# On branch //')\\$ "
Or check out the more efficient git/contrib/completion/git-completion.bash from git.git; it provides a function __git_ps1 that forks fewer processes and is smarter about git workflow, so you can use: PS1='...$(__git_ps1 " (%s)")...' - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkitW7QACgkQ84KuGfSFAYA6IACZAZgqGJ5/3Hia94xa3OdlLiU2 /NYAnAqNsw/4UnTas4Cbaziww8qPwFz2 =8Ktf -----END PGP SIGNATURE-----
