bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git workflow


From: Eric Blake
Subject: Re: git workflow
Date: Thu, 21 Aug 2008 06:12:36 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----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="address@hidden:\\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             address@hidden
-----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-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]