Re: [PATCH v4 1/3] user-manual: Reorganize the reroll sections, adding 'git rebase -i'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 19, 2013, 18:47 UTC
- Message-ID
- <7vwqu45efr.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <e9f8a25c05f9cfe89c6bcbefb69f40cd629f9925.1361267945.git.wking@tremily.us>
"W. Trevor King" <wking@tremily.us> writes:
Show 16 quoted lines
> From: "W. Trevor King" <wking@tremily.us> > > 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 <wking@tremily.us> > ---
Thanks.
Show 8 quoted lines
> +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.