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

Re: Possible git bug

From
Jeff King <peff@peff.net>
Date
Aug 14, 2013, 06:53 UTC
Message-ID
<20130814065339.GA3744@sigill.intra.peff.net>
In-Reply-To
<CACx-yZ3Ba2vU4Jhjdtp1Ko=VjwarDkdHtN7ZFCzrU9Pz7-+S_Q@mail.gmail.com>
On Wed, Aug 14, 2013 at 07:42:11AM +0200, Daniel Knittl-Frank wrote:
Show 9 quoted lines
> > So would that be a bug? Or maybe a feature? I would like it that
> > when you do a rebase and select no commits, it will rebase ontop of
> > the commit you chose, and remove all the commits not shown in the
> > interactive listing (so all).
> 
> You can just use `git reset --hard <commit to rollback to>`  to
> discard all commits after the given commit (Unless they're part of
> another branch, of course). `git reset --soft` if you want to keep the
> state of your current working directory.

You can also use a "noop" line in the rebase instruction list rather than a completely blank list to mean "yes, really, do not apply any commits".

-Peff
Previous: Daniel Knittl-Frank
Message 3 of 3 in “Possible git bug”
  1. Hugh DavenportAug 14, 2013
  2. Daniel Knittl-FrankAug 14, 2013
  3. Jeff KingAug 14, 2013

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.