Re: splitting a commit that adds new files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 2, 2014, 18:15 UTC
- Message-ID
- <xmqqzjm9fkk4.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CACsJy8BXGZ+1Oqrpcky5JPCtZRwvxmxhXGfuEqY9Ct4Pt8FmJg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 6 quoted lines
> I usually start splitting a commit with "reset @^" then "add -p" back. > The problem is "reset @^" does not keep track of new files added in > HEAD, so I often end up forgetting to add new files back (with "add > -p"). I'm thinking of making "reset" to do "add -N" automatically for > me so I won't miss changes in "add -p". But maybe people already know > how to deal with this case without adding more code?
Is "reset -p" what you are looking for? I do not use that myself, though.