[Numpy-discussion] Remove current 1.7 branch?

Hänel Nikolaus Valentin valentin.haenel@epfl...
Thu Jul 19 15:12:33 CDT 2012


Hi,

* Ralf Gommers <ralf.gommers@googlemail.com> [2012-07-19]:
> On Thu, Jul 19, 2012 at 4:14 PM, Charles R Harris <charlesr.harris@gmail.com
> > On Thu, Jul 19, 2012 at 7:45 AM, Travis Oliphant <travis@continuum.io>wrote:
> >
> >> I'm not sure what the conclusion actually was from this long thread.
> >>
> >> But, in trying to update the 1.7.x branch, I ended up in a very odd state
> >> with respect to the github pages.   I used git filter-branch to try and get
> >> rid of "empty" commits that were showing up for some reason.   However,
> >> this resulted in a branch that seemed fine on my local version but when
> >> pushed to github ended up duplicating nearly every commit in the
> >> maintenance branch so that the commits page for maintenance/1.7.x showed a
> >> duplicate commit for every actual commit,
> >>
> >> I didn't know how to fix this except to delete the branch (after doing a
> >> diff with master), recreate the branch, and apply the saved diff as a
> >> patch.   I'm very sorry if I messed anyone up.
> >>
> >> I thought the plan was to delete the branch anyway.     There could be
> >> something else wrong as well, but I'm not sure what the implication of your
> >> message is, exactly.
> >>
> >> People using the maintenance/1.7.x branch (how many people were actually
> >> using it?) will need to delete their local branch and re-pull from github.
> >>
> >>
> > I agree that the easiest thing to do is remove the current 1.7 branch and
> > branch again. It isn't quite according to the book of Linus, but it will
> > get us where we need to be.
> >
> > git push upstream :maintenance/1.7.x
> >
> 
> No, why? The damage is already done, this doesn't change anything. The
> point was, as several people pointed out, to merge 1.7.x into master. Then
> it could have either been deleted and recreated, or fast-forwarded. The
> merge should have been straightforward. Nathaniel provided all commands
> needed.

Indeed, deleting the branch is no longer required, as the wrong history
which was erroneously pushed has already been deleted. I suppose it
would be good to get confirmation that the maintenance/1.7.x branch
should now be at commit f93774d. Is that correct?

> For now, let's leave it as is. Everyone who was using 1.7.x should just
> delete his branch and recreate it. Then force push it to their own Github
> account if necessary.

+1

Alternatively you can use 'git reset --hard @{u}' where '@{u}' is short
for upstream-branch:

    zsh» git co maintenance/1.7.x
    Switched to branch 'maintenance/1.7.x'
    Your branch and 'origin/maintenance/1.7.x' have diverged,
    and have 4 and 124 different commits each, respectively.

    zsh» git log -1 --oneline
    95c84bf Merge pull request #318 from certik/ondrej1

    zsh» git reset --hard @{u}
    HEAD is now at f93774d Update release notes and version number.

    zsh» git log -1 --oneline
    f93774d Update release notes and version number.

Using '@{u}' requires you to have an appropriate upstream-branch set:

    zsh» git config remote.origin.url
    git://github.com/numpy/numpy.git

    zsh» git config branch.maintenance/1.7.x.remote
    origin

    zsh» git config branch.maintenance/1.7.x.merge
    refs/heads/maintenance/1.7.x


Or from the .git/config:

    zsh» cat .git/config |& grep -A 2 "remote \"origin\""
    [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = git://github.com/numpy/numpy.git

    zsh» cat .git/config |& grep -A 3 maintenance/1.7.x
    [branch "maintenance/1.7.x"]
            remote = origin
            merge = refs/heads/maintenance/1.7.x

Hope that helps.

V-


More information about the NumPy-Discussion mailing list