Confused about github rebasing

Jonathan M Davis jmdavisProg at gmx.com
Thu Mar 15 14:23:48 PDT 2012


On Thursday, March 15, 2012 16:17:50 Sean Cavanaugh wrote:
> On 3/15/2012 3:56 PM, Alex Rønne Petersen wrote:
> > On 15-03-2012 21:53, Gour wrote:
> >> On Thu, 15 Mar 2012 13:49:14 -0700
> >> 
> >> "H. S. Teoh"<hsteoh at quickfur.ath.cx> wrote:
> >>> Another question. How to I repair my current history, which is all
> >>> messed up now?
> >> 
> >> By not using DVCS which allows you to rewrite history (hint: check
> >> Fossil). ;)
> > 
> > It's perfectly useful in DVCS. Without it, you'd have a mess of a
> > history when you send your changes upstream. That's not really acceptable.
> 
> Why would you delete history? Thats pretty much the primary purpose of
> source control.

There's a difference between the history in the main repository and the history 
in a local branch. It may make a lot of sense to make a lot of small commits 
to your local branch. It's can be easier to manage and rollback small changes 
that way. But it gets to be pretty ugly if the main history has a whole ton of 
small commits. So, it's not all that uncommon to rebase at least sections of 
your local branch's history before merging it into the main repository. You 
don't lose any of the changes. You just don't have as many commits. And once 
it's in the main repository, you never rebase.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list