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

Re: How to split a big commit

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Apr 5, 2011, 02:52 UTC
Message-ID
<BANLkTim5j8cezy8jhs9dqPXYJRkRGf0GMA@mail.gmail.com>
In-Reply-To
<20110405000852.GA1704@elie>
On Tue, Apr 5, 2011 at 7:08 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 13 quoted lines
> Hi Duy,
>
> Nguyen Thai Ngoc Duy wrote:
>
>> After a lot of small commits and a few mixed up large commits, it was
>> too messy that I merged them all into one big commit then started
>> spliting it into smaller, reasonable patches. Just wonder if anybody
>> else faces the same thing and how they deal with it. I used "git reset
>> --soft <big commit>^" and "git add -N" because there were new files,
>> but it was clumsy.
>
> I tend to do "git reset HEAD^ -- ." and then "git add -N ." and
> "git add -p", for what it's worth.
But you would need to undo "git add -N" for those files you don't want in yet?
-- 
Duy
Previous: Lasse Makholm
Message 6 of 6 in “How to split a big commit”
  1. Nguyen Thai Ngoc DuyApr 4, 2011
  2. Ramkumar RamachandraApr 4, 2011
  3. Nguyen Thai Ngoc DuyApr 4, 2011
  4. Jonathan NiederApr 5, 2011
  5. Lasse MakholmApr 5, 2011
  6. Nguyen Thai Ngoc DuyApr 5, 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.