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

Re: how to combine 2 commits?

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jan 13, 2009, 06:48 UTC
Message-ID
<vpqiqojpuqn.fsf@bauges.imag.fr>
In-Reply-To
<slrngmodgv.ple.sitaramc@sitaramc.homelinux.net>
Sitaram Chamarty <sitaramc@gmail.com> writes:
Show 5 quoted lines
> I like using "git rebase -i HEAD~5" (if I want to rebase the
> last 5 commits).  In the editor that pops up, I reorder the
> ones that I know should be together, and on each set to be
> squashed, I change the "pick" to "s" (for squash) on all but
> the first one.  Save the file and it's all done.
And right after, you probably want to do stg like
  git diff master@{1} master

to see whether you actually changed the result by reordering your patches.

-- 
Matthieu
Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 8 of 9 in “how to combine 2 commits?”
  1. bill lamJan 13, 2009
  2. Jeff WhitesideJan 13, 2009
  3. Boyd Stephen Smith Jr.Jan 13, 2009
  4. Imran M YousufJan 13, 2009
  5. bill lamJan 13, 2009
  6. Stephen R. van den BergJan 13, 2009
  7. Sitaram ChamartyJan 13, 2009
  8. Matthieu MoyJan 13, 2009
  9. Sitaram ChamartyJan 13, 2009

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.