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

Re: Folding commits together

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Sep 22, 2010, 11:13 UTC
Message-ID
<vpqsk12rpz4.fsf@bauges.imag.fr>
In-Reply-To
<loom.20100922T123419-101@post.gmane.org>
Maaartin <grajcar1@seznam.cz> writes:
Show 8 quoted lines
> I've made a couple of trivial commits I'd like to fold into a single commit now. 
> In the manpage of git-rebase I saw a recipe how to do it using rebase -i and it 
> seemed quite trivial, but it doesn't work for me. I'm in a clean state on branch 
> master and want fold the last 3 commits into one - this is probably the most 
> trivial use case. Whatever I try I get an empty .git/rebase-merge/git-rebase-
> todo, so I can't get to the point of using <<If you want to fold two or more 
> commits into one, replace the command "pick" for the second and subsequent 
> commits with "squash" or "fixup".>>
Which exact command did you type? Something like this should do it:
git rebase -i HEAD~3
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: MaaartinNext: Maaartin
Message 2 of 4 in “Folding commits together”
  1. MaaartinSep 22, 2010
  2. Matthieu MoySep 22, 2010
  3. MaaartinSep 22, 2010
  4. Jay SoffianSep 22, 2010

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.