git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-reset any branch head
@ 2009-07-29 10:05 ZoltánFüzesi
  2009-07-29 11:16 ` Santi Béjar
  0 siblings, 1 reply; 5+ messages in thread
From: ZoltánFüzesi @ 2009-07-29 10:05 UTC (permalink / raw)
  To: git

Hi, sometimes it would be nice to reset not only the current,
but any given branch head. What do you think?

Zé

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-reset any branch head
  2009-07-29 10:05 git-reset any branch head ZoltánFüzesi
@ 2009-07-29 11:16 ` Santi Béjar
  2009-07-29 11:37   ` ZoltánFüzesi
  0 siblings, 1 reply; 5+ messages in thread
From: Santi Béjar @ 2009-07-29 11:16 UTC (permalink / raw)
  To: ZoltánFüzesi; +Cc: git

2009/7/29 ZoltánFüzesi <zfuzesi@eaglet.hu>:
> Hi, sometimes it would be nice to reset not only the current,
> but any given branch head. What do you think?

git update-ref

or do  you mean with porcelain commands?

HTH,
Santi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-reset any branch head
  2009-07-29 11:16 ` Santi Béjar
@ 2009-07-29 11:37   ` ZoltánFüzesi
  2009-07-29 12:33     ` Pat Notz
  0 siblings, 1 reply; 5+ messages in thread
From: ZoltánFüzesi @ 2009-07-29 11:37 UTC (permalink / raw)
  To: git

Santi Béjar <santi <at> agolina.net> writes:

> 
> 2009/7/29 ZoltánFüzesi <zfuzesi <at> eaglet.hu>:
> > Hi, sometimes it would be nice to reset not only the current,
> > but any given branch head. What do you think?
> 
> git update-ref
> 
> or do  you mean with porcelain commands?
> 
> HTH,
> Santi
> 

Suppose I have 3 branches A, B, C, and A is checked out.
I would like to set B's head to point to C's with a command like:
git-reset --head B C

Currently I can achieve it by 2 commands:
git-checkout B
git-reset --hard C

Zé

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-reset any branch head
  2009-07-29 11:37   ` ZoltánFüzesi
@ 2009-07-29 12:33     ` Pat Notz
  2009-07-29 12:39       ` ZoltánFüzesi
  0 siblings, 1 reply; 5+ messages in thread
From: Pat Notz @ 2009-07-29 12:33 UTC (permalink / raw)
  To: ZoltánFüzesi; +Cc: git

On Wed, Jul 29, 2009 at 5:37 AM, ZoltánFüzesi<zfuzesi@eaglet.hu> wrote:
> Santi Béjar <santi <at> agolina.net> writes:
>
>>
>> 2009/7/29 ZoltánFüzesi <zfuzesi <at> eaglet.hu>:
>> > Hi, sometimes it would be nice to reset not only the current,
>> > but any given branch head. What do you think?
>>
>> git update-ref
>>
>> or do  you mean with porcelain commands?
>>
>> HTH,
>> Santi
>>
>
> Suppose I have 3 branches A, B, C, and A is checked out.
> I would like to set B's head to point to C's with a command like:
> git-reset --head B C
>
> Currently I can achieve it by 2 commands:
> git-checkout B
> git-reset --hard C
>

I think you simply want:

   git branch -f B C

~ Pat

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-reset any branch head
  2009-07-29 12:33     ` Pat Notz
@ 2009-07-29 12:39       ` ZoltánFüzesi
  0 siblings, 0 replies; 5+ messages in thread
From: ZoltánFüzesi @ 2009-07-29 12:39 UTC (permalink / raw)
  To: git

Pat Notz <patnotz <at> gmail.com> writes:

> 
> I think you simply want:
> 
>    git branch -f B C
> 
> ~ Pat
> 

Yes! :)
Thx,
Zé

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-29 12:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 10:05 git-reset any branch head ZoltánFüzesi
2009-07-29 11:16 ` Santi Béjar
2009-07-29 11:37   ` ZoltánFüzesi
2009-07-29 12:33     ` Pat Notz
2009-07-29 12:39       ` ZoltánFüzesi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).