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

Re: Removing a commit from a local branch

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 11, 2009, 22:48 UTC
Message-ID
<m3hc45zcgq.fsf@localhost.localdomain>
In-Reply-To
<a038bef50901111442y16695664y4fed7cdd9d8af27@mail.gmail.com>
"Chris Packham" <judge.packham@gmail.com> writes:
Show 17 quoted lines
> Consider the following example. The maintainer has the following
> branch locally
> 
>   todeliver: A-B-C-D
> 
> He is happy with commits A, C and D but wants to reject B. Ideally I
> want to be able to say
>   git rebase --onto <parent of B> <child of B> todelvier
> 
> and get
>   todeliver: A-C'-D'
> 
> I know that <parent of B> can be referred to as B~1 but what about
> <child of B>? I've read through the man page for git-rev-parse and
> nothing stands out as child of commit X.
> 
> Is there a better what do achieve what I'm after?

Yes, I think it would be easier to either use "git rebase --interactive" (with some script taking place of EDITOR, or something), or prod Stephan Beyer (CC-ed) to finish git-sequencer...

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Chris PackhamNext: Björn Steinbrink
Message 2 of 5 in “Removing a commit from a local branch”
  1. Chris PackhamJan 11, 2009
  2. Jakub NarebskiJan 11, 2009
  3. Björn SteinbrinkJan 11, 2009
  4. Chris PackhamJan 12, 2009
  5. Sitaram ChamartyJan 12, 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.