git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-reset any branch head

From
Pat Notz <patnotz@gmail.com>
Date
Jul 29, 2009, 12:33 UTC
Message-ID
<1cd1989b0907290533q1553773euce67dff47db546a7@mail.gmail.com>
In-Reply-To
<loom.20090729T112521-558@post.gmane.org>
On Wed, Jul 29, 2009 at 5:37 AM, ZoltánFüzesi<zfuzesi@eaglet.hu> wrote:
Show 23 quoted lines
> 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
Show 7 quoted lines
> 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
>
Previous: ZoltánFüzesiNext: ZoltánFüzesi
Message 4 of 5 in “git-reset any branch head”
  1. ZoltánFüzesiJul 29, 2009
  2. Santi BéjarJul 29, 2009
  3. ZoltánFüzesiJul 29, 2009
  4. Pat NotzJul 29, 2009
  5. ZoltánFüzesiJul 29, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.