public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5•se>
To: Bruno Haible <bruno@clisp•org>
Cc: Junio C Hamano <gitster@pobox•com>, git@vger•kernel.org
Subject: Re: request for documentation about branch surgery
Date: Tue, 07 Jul 2009 13:03:58 +0200	[thread overview]
Message-ID: <4A532B9E.7020606@op5.se> (raw)
In-Reply-To: <200907071213.25418.bruno@clisp.org>

Bruno Haible wrote:
> Hi Junio,
> 
>> You learn new things every day, and today is such a day ;-)
>>
>>>   If you want to add a commit in the middle of a branch:
>>>
>>>             A---C---...---Z    master
>>>
>>>   =>
>>>
>>>             A---B---C---...---Z    master
>>>
>>>   it is achieved by
>>         $ git checkout master~25 ;# detach HEAD at A
>>         $ edit edit edit
>>         $ git commit ;# creates B
>>
>> which makes
>>
>>                B              HEAD (detached)
>>               /
>>              A---C---...---Z    master
>>
>> and then
>>
>>         $ git rebase HEAD master
>>
>> which reshapes the history into
>>
>>
>>                B---C'--...---Z' master
>>               /
>>              A---C---...---Z    master@{1}
>>
>> and you are done.
> 
> Cool! I wouldn't have guessed that. Now you wrote it into the mailing list
> archives. It would be even better if it were mentioned in the user's manual,
> chapter "Rewriting history and maintaining patch series"
> 

Anyone can submit patches. I find your persistent urging that someone else
do this for you slightly annoying. Now that you've been helped along the
way to understanding, it's your turn to do your bit and write up the info
you've received as a proper patch. This will help ensure that:
a) Other people can find the relevant information quickly
b) We won't have to answer the same questions again
c) You gain an even deeper understanding about how the various features
   actually work as your patches are submitted for review and improvements
   are suggested for them by the list members
d) We answer your questions again next time you have any

You can ofcourse refrain from submitting patches and just hope that d)
happens anyway. It probably will, but not indefinitely.

Thanks.

-- 
Andreas Ericsson                   andreas.ericsson@op5•se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

  reply	other threads:[~2009-07-07 11:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 23:05 request for documentation about branch surgery Bruno Haible
2009-07-07  2:30 ` Elijah Newren
2009-07-07  3:45   ` Elijah Newren
2009-07-07  9:51   ` Bruno Haible
2009-07-07 10:06     ` Andreas Ericsson
2009-07-07  2:50 ` Junio C Hamano
2009-07-07 10:13   ` Bruno Haible
2009-07-07 11:03     ` Andreas Ericsson [this message]
2009-07-07 15:52     ` Junio C Hamano
2009-07-07 18:28 ` Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A532B9E.7020606@op5.se \
    --to=ae@op5$(echo .)se \
    --cc=bruno@clisp$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox