On Mon, 2007-05-21 at 09:22 -0600, Brian Paul wrote: 
> Julien Cristau wrote:
> > On Mon, May 21, 2007 at 09:04:00 -0600, Brian Paul wrote:
> > 
> >> 1. Whenever I push changes on my master branch I'm seeing:
> >>
> >> updating 'refs/heads/master'
> >>    from 9e8a961dd7d7b717a9fb4ecdea1c1b60ea355efe
> >>    to   a8676c45ccab52117c70f2e90fd820d745261f51
> >> error: remote 'refs/heads/mesa_7_0_branch' is not a strict subset of 
> >> local ref 'refs/heads/mesa_7_0_branch'. maybe you are not up-to-date and 
> >> need to pull first?
> >>
> >> How do I fix that?
> >>
> > I think 'git-push origin master' shouldn't push to mesa_7_0_branch.
> 
> I think the main problem is git push/pull does merges between branches 
> if you forget to specify the branch name.  That seems pretty dumb.  It 
> should be *hard* to accidentally merge branches.

Is it still the case as of GIT 1.5? Even if it is by default, it can now
be configured for each branch separately which remote branch(es) to
merge by default. I thought the default was to merge the remote branch
of the same name by default now, but I'm not sure.


> >> 2. I can't seem to push changes on my mesa_7_0_branch anymore:
> >>
> >> $ edit file
> >> $ commit file
> >> $ git push origin mesa_7_0_branch
> >> error: remote 'refs/heads/mesa_7_0_branch' is not a strict subset of 
> >> local ref 'refs/heads/mesa_7_0_branch'. maybe you are not up-to-date and 
> >> need to pull first?
> >>
> >>    git fetch
> >> Generating pack...
> >> Done counting 177 objects.
> >> Packing 177 objects......................
> >> Indexing 177 objects.
> >>   100% (177/177) done
> >> Resolving 80 deltas.
> >>   100% (80/80) done
> >> * refs/remotes/origin/master: fast forward to branch 'master' of 
> >> git+ssh://[EMAIL PROTECTED]/git/mesa/mesa
> >>    old..new: 4fca6bf..a8676c4
> >> * refs/remotes/origin/mesa_7_0_branch: fast forward to branch 
> >> 'mesa_7_0_branch' of git+ssh://[EMAIL PROTECTED]/git/mesa/mesa
> >>    old..new: fbcac5a..d38b74a
> >> yutani 62$ git rebase origin
> > 
> > Try 'git-rebase origin/mesa_7_0_branch' instead?

That won't help. I think the problem here is that Ian accidentally
force-pushed mesa_7_0_branch (so Brian's version bump commit ended up on
the branch), so Brian's origin/mesa_7_0_branch is inconsistent with
mesa_7_0_branch in the shared repository and neets to be force-fetched.

Force-pushing to a shared repository is bad. Everybody should make sure
their configuration doesn't force-push by default, and if git-push
fails, don't use git-push -f.

> Is that the same as 'git rebase origin mesa_7_0_branch' because that 
> (the later) worked.

No, see below.

> Somewhere along the line I accidentally merge master into my 
> mesa_7_0_branch branch.  

Right above, possibly, that rebased your mesa_7_0_branch onto your
origin branch (which I recommend deleting with a 1.5 style repository
such as yours). 

> How do I undo that?

After fixing your origin/mesa_7_0_branch, and assuming you don't have
any commits on your mesa_7_0_branch that you don't want to lose:
git-reset --hard origin/mesa_7_0_branch .


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to