Re: [PATCH] reset: add an example of how to split a commit into two

2017-02-03 Thread Jacob Keller
On Fri, Feb 3, 2017 at 10:59 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >>> +$ git reset -p HEAD^<1> >> >> For good practice, perhaps put "git diff --cached HEAD^" before "git commit". >> >> I tend to avoid "reset -p" and

Re: [PATCH] reset: add an example of how to split a commit into two

2017-02-03 Thread Junio C Hamano
Duy Nguyen writes: >> +$ git reset -p HEAD^<1> > > For good practice, perhaps put "git diff --cached HEAD^" before "git commit". > > I tend to avoid "reset -p" and "checkout -p" though because sometimes > it does not work. Not sure if it's just me, I

Re: [PATCH] reset: add an example of how to split a commit into two

2017-02-03 Thread Duy Nguyen
On Fri, Feb 3, 2017 at 7:30 AM, Jacob Keller wrote: > From: Jacob Keller > > It is sometimes useful to break a commit into parts to more logically > show how the code changes. There are many possible ways to achieve this > result, but one simple

[PATCH] reset: add an example of how to split a commit into two

2017-02-02 Thread Jacob Keller
From: Jacob Keller It is sometimes useful to break a commit into parts to more logically show how the code changes. There are many possible ways to achieve this result, but one simple and powerful one is to use git reset -p. Add an example to the documentation showing