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

2017-02-04 Thread Duy Nguyen
On Sat, Feb 4, 2017 at 7:16 PM, Philip Oakley wrote: > From: "Duy Nguyen" >> >> On Sat, Feb 4, 2017 at 3:28 AM, Jacob Keller >> wrote: >>> >>> + >>> +$ git reset HEAD^ <1> >> >> >> It may be a good idea to add -N here, so that 'add -p' can pick up the >> new

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

2017-02-04 Thread Philip Oakley
From: "Duy Nguyen" On Sat, Feb 4, 2017 at 3:28 AM, Jacob Keller wrote: + +$ git reset HEAD^ <1> It may be a good idea to add -N here, so that 'add -p' can pick up the new files if they are added in HEAD. When looking at the man page for `reset` [1] it

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

2017-02-04 Thread Duy Nguyen
On Sat, Feb 4, 2017 at 3:28 AM, Jacob Keller wrote: > + > +$ git reset HEAD^ <1> It may be a good idea to add -N here, so that 'add -p' can pick up the new files if they are added in HEAD. > +$ git add -p<2> -- Duy

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

2017-02-03 Thread Junio C Hamano
Jacob Keller writes: > +Split a commit into two:: Let's say "...into two (or more)" to match what appears in "SPLITTING COMMITS" section of "rebase -i" documentation. Yours is written as a sequence of more concrete steps than the existing one over there, so it may also make sense to add referen

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

2017-02-03 Thread Jacob Keller
From: Jacob Keller It is often useful to break a commit into multiple parts that are more logical separations. This can be tricky to learn how to do without the brute-force method if re-writing code or commit messages from scratch. Add a section to the git-reset documentation which shows an exam