Re: git branch help?

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

 



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

Attachment: pgpDoI3xi4aUz.pgp
Description: PGP signature

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux