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

Re: [PATCH] rebase: learn --discard subcommand

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
May 30, 2011, 04:50 UTC
Message-ID
<4DE3222F.6030604@alum.mit.edu>
In-Reply-To
<7vpqn2psjv.fsf@alter.siamese.dyndns.org>
On 05/28/2011 08:51 PM, Junio C Hamano wrote:
Show 8 quoted lines
> "git reset --hard" used to be such a command in simpler times. It removes
> MERGE_HEAD unconditionally, so that a confused user can start from scratch
> without having to worry about what was in progress. As a devil's advocate,
> I am wondering if it is a good idea to simply teach "reset --hard" to also
> remove any and all "sequence" cruft (.git/rebase-apply, .git/rebase-merge,
> CHERRY_PICK_HEAD; we might have others I do not recall offhand) and be
> done with it. It is a large hammer, but it is certainly the easiest to
> explain and the simplest to understand way to get out of any troubles.

If it would be desirable to separate the resetting of the working tree from the resetting of any in-progress operation, perhaps "git reset --abort" (by analogy with "git reset --abort" etc) would be a possible spelling of the latter. To reset any in-progress operations *and* reset the working tree, on could use "git reset --hard --abort".

I strongly agree with another poster that it would be useful if "git status" would print information about in-progress operations.

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Jakub NarebskiNext: Jonathan Nieder
Message 9 of 17 in “rebase: learn --discard subcommand”
  1. rebase: learn --discard subcommandMartin von Zweigbergk, May 28, 2011
  2. Ramkumar RamachandraMay 28, 2011
  3. Martin von ZweigbergkMay 29, 2011
  4. Junio C HamanoMay 28, 2011
  5. Tim MazidMay 28, 2011
  6. Jonathan NiederMay 28, 2011
  7. Martin von ZweigbergkMay 29, 2011
  8. Jakub NarebskiMay 29, 2011
  9. Michael HaggertyMay 30, 2011
  10. Jonathan NiederMay 28, 2011
  11. Tim MazidMay 29, 2011
  12. Martin von ZweigbergkMay 29, 2011
  13. Jonathan NiederMay 29, 2011
  14. Michael HaggertyMay 30, 2011
  15. Tim MazidMay 30, 2011
  16. Michael HaggertyMay 30, 2011
  17. Miles BaderMay 30, 2011

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.