git branch help?
Todd Zullinger
tmz at pobox.com
Tue Aug 3 13:51:05 UTC 2010
Karel Zak wrote:
> On Tue, Aug 03, 2010 at 12:56:37PM +0530, Rahul Sundaram wrote:
>> On 08/03/2010 12:53 PM, Peter Hutterer wrote:
>>> correct, git will share objects between branches, so by storing in different
>>> directories you'll loose that advantage.
>>>
>>> I've got a shell prompt that shows me the branch name whenever I enter a git
>>> directory so I don't have to worry about committing to the wrong branch.
>>
>> For those wondering how,
>>
>> http://blog.vagmim.com/2009/04/git-branch-on-command-prompt.html
>
> This is pretty primitive implementation (do you really want to call
> python from $PS1? ;-)
This looks like a new version of the wheel many ruby folks re-invented
when they started moving to git. Sadly, these poor substitutes for
__git_ps1() are often pushed.
The wiki has some info on configuring __git_ps1() here:
https://fedoraproject.org/wiki/Git_Quickref#Display_current_branch_in_bash
(This is linked from https://fedoraproject.org/wiki/Using_Fedora_GIT
as well.)
In addition to displaying the current branch, __git_ps1() will show
you when you're in the middle of a merge or rebase operation. It can
optionally show you when you have modified, staged, and/or untracked
files in your work tree. These are things that the poor-man's
alternatives don't generally do at all.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are no differences but differences of degree between different
degrees of difference and no difference.
-- William James, under nitrous oxide; 1882
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20100803/e7fb7244/attachment.bin
More information about the devel
mailing list