Re: [Newbie] How to *actually* get rid of remote tracking branch?

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

 



"Lars Hjemli" <hjemli@xxxxxxxxx> writes:

> On Nov 13, 2007 6:58 PM,  <osv@xxxxxxxxx> wrote:
>> Jakub Narebski <jnareb@xxxxxxxxx> writes:
>> > Steffen Prohaska wrote:
>> >> It doesn't make sense to delete remote-tracking branches
>> >> locally if they are still present at the remote.  The main
>> >> purpose of a remote-tracking branch is to be identical to the
>> >> real remote branch.
>> >
>> > True, but it would be nice to have an option to _exclude_ some
>> > branches from fetching (for example 'html' and 'man' branches
>> > of git.git), while still picking up new branches automatically
>> > on fetch.
>>
>> Guys, could you please read man git-branch?
>
> I understand that the man-page could be confusing, the problem is that
> these examples are quite old: they made more sense when git didn't
> support wildcards in refspecs.

Yeah, I understand that. But there doesn't seem to be actual reason not
to support them even with wildcards support.

> You want an easy way to tell git to stop tracking the pu-branch. This
> can be achieved by editing the [remote "origin"] section in
> .git/config: remove the fetch-line containing refs/heads/* and add one
> fetch line for each ref you'd like to track. But beware that you have
> to add any new branches which you would like to track in the same way
> (editing .git/config).

Thanks, I got it. Though the last sentence makes it less useful then it
should be. [This somewhat reminds me CVS problems when you can delete
directories that you don't want, and checkout won't restore them
(without special switch), but then you won't automatically get new
directories :( Though admittedly the situation with the remote-tracking
branches is less annoying.]

>
> The reason git-branch -d -r doesn't do this automatically is probably
> that nobody has seen a need for it to do so...

Me thinks it has probably been just overlooked when wildcards were
added. Anyway, either documentation or git-branch -d -r should be fixed,
I think.

-- 
Sergei.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux