threads / discuss / 2607

what is "rebase"?

Subject: what is "rebase"?

## tl;dr

5 messages between Nov 19, 2005 and Nov 20, 2005.

replies: 4people: 3as markdown or json

Randal L. Schwartz· Nov 19, 2005, 23:25 UTC · lore

Can someone point me to a simple explanation of what "rebase" is? The git-rebase manpage doesn't define the word, or provide an example of its use.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Johannes Schindelin· Nov 20, 2005, 01:15 UTC · re: Randal L. Schwartz · lore

Re: what is "rebase"?

Hi,
On Sun, 19 Nov 2005, Randal L. Schwartz wrote:
> Can someone point me to a simple explanation of what "rebase" is?
How about the definition in Documentation/glossary.txt?
> rebase::
>         To clean a branch by starting from the head of the main line of
>         development ("master"), and reapply the (possibly cherry-picked)
>         changes from that branch.

Hth, Dscho

Randal L. Schwartz· Nov 20, 2005, 01:58 UTC · re: Johannes Schindelin · lore

Re: what is "rebase"?

>>>>> "Johannes" == Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Johannes> How about the definition in Documentation/glossary.txt?
>> rebase::
>> To clean a branch by starting from the head of the main line of
>> development ("master"), and reapply the (possibly cherry-picked)
>> changes from that branch.

Well, I got what I wanted... someone pointing me to a simple explanation. However, I'm still lost. When would I do this, and what will the effect be?

Is this what I would use if I want to discard history except for major milestones? Like if I had:

        A - edit - edit - edit - B - edit - edit - edit - C
and I wanted to really just retain:
        A - B - C
Or is this just to make it look like:
        C

Still not sure what "cherry-pick" is either. And that's *not* in the glossary. :)

I'm just worried about my archive getting bigger and bigger and having lots of junk in it that I can't get rid of.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Randal L. Schwartz· Nov 20, 2005, 02:10 UTC · re: Randal L. Schwartz · lore

Re: what is "rebase"?

>>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:

Randal> Well, I got what I wanted... someone pointing me to a simple explanation. Randal> However, I'm still lost. When would I do this, and what will the Randal> effect be?

Nevermind.  Found rebase-from-internal.txt.
I understand much better now.
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Andreas Ericsson· Nov 20, 2005, 02:12 UTC · re: Randal L. Schwartz · lore

Re: what is "rebase"?

Randal L. Schwartz wrote:
> Is this what I would use if I want to discard history except for
> major milestones?
> 
No.
> Still not sure what "cherry-pick" is either. And that's *not*
> in the glossary. :)
> 
man git-cherry-pick
> I'm just worried about my archive getting bigger and bigger and
> having lots of junk in it that I can't get rid of.
> 

If you do experimental development on a branch and want to throw stuff away (commits, tags, whatnot), you should run "git-reset". It can bring any combination of index and working tree back to any commit in the history of that branch.

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

← back to recent threads