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

Re: RFC: git squash

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 23, 2018, 20:31 UTC
Message-ID
<xmqq371rtpmj.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAA7Zk=smFOZ5+ThOZ9bfr8+UB_tD1371Oiy501sR=J4xjKdhsQ@mail.gmail.com>
Julius Musseau <julius@mergebase.com> writes:
> I'm embarrassed to realise your approach matches the top-voted
> stack-overflow answer on the subject:
> https://stackoverflow.com/a/5201642

I personally do not visit stack-overflow, but I am happy to see that there are people who remember "right" way to do this among the folks who do.

"reset --soft" was invented exactly for this use case, and you can use it even with dirty working tree and dirty index (they are left intact).

Previous: Julius Musseau
Message 4 of 4 in “RFC: git squash”
  1. Julius MusseauFeb 23, 2018
  2. Junio C HamanoFeb 23, 2018
  3. Julius MusseauFeb 23, 2018
  4. Junio C HamanoFeb 23, 2018

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.