From: Junio C Hamano Date: Tue, 19 Feb 2013 18:47:04 GMT Subject: Re: [PATCH v4 1/3] user-manual: Reorganize the reroll sections, adding 'git rebase -i' Message-ID: <7vwqu45efr.fsf@alter.siamese.dyndns.org> In-Reply-To: "W. Trevor King" writes: > From: "W. Trevor King" > > I think this interface is often more convenient than extended cherry > picking or using 'git format-patch'. In fact, I removed the > cherry-pick section entirely. The entry-level suggestions for > rerolling are now: > > 1. git commit --amend > 2. git format-patch origin > git reset --hard origin > ...edit and reorder patches... > git am *.patch > 3. git rebase -i origin > > Signed-off-by: W. Trevor King > --- Thanks. > +Sometimes you want to edit a commit deeper in your history. One > +approach is to use `git format-patch` to create a series of patches, > +then reset the state to before the patches: > > ------------------------------------------------- > +$ git format-patch origin > +$ git reset --hard origin > ------------------------------------------------- Technically speaking, this does not "reset to before the patches". You would need "git reset --hard $(git merge-base origin HEAD)" or something like that. I think this is fine as-is in the flow of text, where we haven't taught the readers the use of merge-base to find the fork point.