Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-scm
Navigation:
Lists: gentoo-scm: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-scm@g.o
From: Arun Raghavan <ford_prefect@g.o>
Subject: Re: Converting a recent CVS copy - Item 3: pushing, availability
Date: Sat, 18 Apr 2009 10:33:34 +0530
On Fri, 2009-04-17 at 22:54 -0500, William Hubbs wrote:
[...]
>  Here is my understanding of what rebase does.  Say that I'm working on
>  the master branch, and I do a commit, but someone else is also working
>  on the master branch at the same time.  They do a commit and push
>  before I do my push.
> 
> Now I try to push.  Git will complain because my master branch is not up
> to date.  If I do a git pull without --rebase at this point, I will
> create a merge in the history.  But, if I do a git pull --rebase, my
> local change, which has not been pushed yet, will be moved forward so
> that it happens after all of the changes I pull.  If there are
> conflicts, I resolve them on my end. then continue the rebase process
> until it is done.  Then I do a git push to push my change to the central
> repository.
> 
> My only question about this would be, what would happen if I do not
> resolve the conflicts correctly locally.

Just to expand on this, what happens is this. Assume the timelines of
the remote and local branches look like this:

remote: 1 -- 2 -- 3 -- 4 -- 5
local:  1 -- 2 -- 3 -- a -- b ('a' and 'b' are local commits)

You last sync'ed your tree at version '3', and want to rebase, so the
tree looks like:

local:  1 -- 2 --3 --4 -- 5 -- a -- b

What 'git rebase' does is that it rewinds the local tree back to '3',
pulls in revisions '4' and '5', then applies each local commit on this
tree. As each 'patch' is applied, if there is a conflict, the rebase
pauses and lets you resolve the conflict (you fix conflicting files and
then 'git add' them), and then you can tell git to continue the rebase.

In this sense, if you do not resolve a conflict correctly, it is about
the same as not resolving a conflict correctly during a 'git pull' --
your tree will be broken (or at least incorrect).

Hope this makes sense.

Cheers,
Arun
Attachment:
signature.asc (This is a digitally signed message part)
Replies:
Re: Converting a recent CVS copy - Item 3: pushing, availability
-- Maciej Mrozowski
References:
Converting a recent CVS copy - Item 3: pushing, availability
-- Robin H. Johnson
Re: Converting a recent CVS copy - Item 3: pushing, availability
-- Caleb Cushing
Re: Converting a recent CVS copy - Item 3: pushing, availability
-- Donnie Berkholz
Re: Converting a recent CVS copy - Item 3: pushing, availability
-- Maciej Mrozowski
Re: Converting a recent CVS copy - Item 3: pushing, availability
-- William Hubbs
Navigation:
Lists: gentoo-scm: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Converting a recent CVS copy - Item 3: pushing, availability
Next by thread:
Re: Converting a recent CVS copy - Item 3: pushing, availability
Previous by date:
Re: Converting a recent CVS copy - Item 3: pushing, availability
Next by date:
Re: Converting a recent CVS copy - Item 3: pushing, availability


Updated Jun 17, 2009

Summary: Archive of the gentoo-scm mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.