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

Re: git rebase --skip

From
Jeff King <peff@peff.net>
Date
Nov 8, 2007, 23:16 UTC
Message-ID
<20071108231632.GC29840@sigill.intra.peff.net>
In-Reply-To
<20071108104403.GB31187@atjola.homenet>
On Thu, Nov 08, 2007 at 11:44:03AM +0100, Björn Steinbrink wrote:
Show 11 quoted lines
> > How about if the state to skip was stashed, the patch reapplied and the
> > differences compared. If they were identical, go ahead and force the
> > reset --hard, otherwise abort. That way, --skip will dwim only when
> > it's safe, and all the lost work can be automagically created by
> > just re-applying the patch again?
> 
> I'd prefer the --force option suggested in some other mail. Maybe I'm
> just not manly enough, but messing up a rebase can mean lots of
> duplicated work, so I'm rather happy with no dwim at all. Maybe for the
> real manly users out there, add a rebase.alwaysForce option so they can
> laugh at me for not using that ;-)

Personally, I don't see the point of a --force option; it turns your work flow from:

  1. git-rebase --skip
  2. Oops, I guess I have to reset.
  3. git-reset --hard; git-rebase --skip
to:
  1. same as above
  2. same as above
  3. git-rebase --force --skip

I guess it's a little bit easier to explain to new users, but it in no way eliminates the annoyance of "I expected this to work, and it didn't, so now I have to think about what happened and enter another command."

AIUI, Andreas's proposal is not so much DWIM as "do the obvious thing, but include a safety valve to prevent throwing away work." Is there actually a case where it would not have the desired effect?

-Peff
Previous: Björn SteinbrinkNext: Junio C Hamano
Message 8 of 20 in “git rebase --skip”
  1. Mike HommeyNov 7, 2007
  2. Johannes SchindelinNov 7, 2007
  3. Jeff KingNov 8, 2007
  4. Jakub NarebskiNov 8, 2007
  5. Björn SteinbrinkNov 8, 2007
  6. Andreas EricssonNov 8, 2007
  7. Björn SteinbrinkNov 8, 2007
  8. Jeff KingNov 8, 2007
  9. Junio C HamanoNov 8, 2007
  10. Björn SteinbrinkNov 9, 2007
  11. Jeff KingNov 9, 2007
  12. Johannes SchindelinNov 9, 2007
  13. J. Bruce FieldsNov 9, 2007
  14. J. Bruce FieldsNov 9, 2007
  15. Jeff KingNov 9, 2007
  16. Daniel BarkalowNov 8, 2007
  17. Mike HommeyNov 8, 2007
  18. Mike HommeyNov 8, 2007
  19. Johannes SchindelinNov 8, 2007
  20. Do git reset --hard HEAD when using git rebase --skipMike Hommey, Nov 8, 2007

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.