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 9, 2007, 03:22 UTC
Message-ID
<20071109032227.GA31760@sigill.intra.peff.net>
In-Reply-To
<7vir4cz45z.fsf@gitster.siamese.dyndns.org>
On Thu, Nov 08, 2007 at 03:52:08PM -0800, Junio C Hamano wrote:
> The user is explicitly saying --skip, so I do not think it is
> dangerous even if we unconditionally did "reset --hard" at that
> point.

Sure, I think the complaint is not that "reset --hard" is the wrong behavior, but that people are prone to type --skip in error. Right now we handle that error in a data-preserving way (we complain, and the user has to think and issue a "throw away this data" command), but automatic reset is less safe (even though there are fewer times when somebody meant to commit instead of just reset, the consequences are harder to recover from).

I've never personally run into this, but I think it is a reasonable thing to think about, and if it is easy to add an additional safety valve (either stashing the index/wt state, or checking before automatic "reset --hard" whether any work has been done towards resolving), then we probably should.

So I am fine with the original patch (unconditional reset --hard), but it would be nice to see the people who care submit concrete proposals for such a safety valve.

> Or we could introduce a new option "--drop" (that's "drop the
> current commit and continue") to do so, if people find that the
> word "skip" does not sound like a scary destructive operation.

I don't think the problem is "users don't realize how scary --skip can be", but rather "I use --skip to resolve this situation 99% of the time, so in the other 1%, I soetimes use it accidentally."

-Peff
Previous: Björn SteinbrinkNext: Johannes Schindelin
Message 11 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.