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

Re: how to squash two commits into only one

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 29, 2011, 18:28 UTC
Message-ID
<7v1v1psrvr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTinjbXzdfkxVRPPSXJj6Z0mMrikzdi2V8N5YAGR-@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>> Actually, that should be: `git reset --soft HEAD^; git commit --amend`.
>
> "git rebase --root" does not seem a bad idea though.

The lack of this did't annoy me enough (one woudln't have to deal with root commits too often) so I wouldn't bother implementing it myself, but "git rebase --root" especially with "-i" would be a nice addition.

i.e. well written and explained patches welcome.
Previous: Will PalmerNext: Dirk Süsserott
Message 12 of 14 in “how to squash two commits into only one”
  1. Lynn LinMar 29, 2011
  2. Tor ArntsenMar 29, 2011
  3. Lynn LinMar 29, 2011
  4. Tor ArntsenMar 29, 2011
  5. Alex RiesenMar 29, 2011
  6. Lynn LinMar 29, 2011
  7. Alex RiesenMar 29, 2011
  8. Joshua JuranMar 29, 2011
  9. Nguyen Thai Ngoc DuyMar 29, 2011
  10. Joshua JuranMar 29, 2011
  11. Will PalmerMar 29, 2011
  12. Junio C HamanoMar 29, 2011
  13. Dirk SüsserottMar 30, 2011
  14. Lynn LinMar 29, 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.