pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible workarounds for mingw setup


From: Ben Pfaff
Subject: Re: possible workarounds for mingw setup
Date: Wed, 08 Oct 2008 21:56:08 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

John Darrington <address@hidden> writes:

> On Mon, Oct 06, 2008 at 04:25:48PM -0700, Ben Pfaff wrote:
>      How about this to gain confidence: push your changes to a new
>      branch.  There's no way that can disturb any existing branches.
>      The syntax for that would be:
>              git push origin HEAD:refs/heads/branch-name
>      where branch-name is whatever you want to call the new branch.
>      (This assumes that you want to push HEAD, i.e. what you currently
>      have checked out and committed.)
>
> Done.

It looks great.  So, now you want to push this to the stable
branch without accidentally merging in all of the changes on
master, even though the change you committed is based on master.
There are at least two ways to do this.

The first way is to check out a new branch based on stable and
then add your change to that.  You can do that with:

        # Create new local branch named for-stable, based on origin/stable.
        git checkout origin/stable -b for-stable

        # Apply the exact named commit.
        git cherry-pick eddc581154263d588af13d95953a37e75362546f

        # Probably there are no conflicts from the cherry-pick,
        # but if there were then you would fix them, 'git add"
        # the fixes, and "git commit" them.

        # Optional: Look at the list of commits and make sure
        # there is exactly one (the one we just cherry-picked)
        # above origin/stable.
        gitk

        # Push the change to the stable branch.
        git push origin HEAD:stable

The second way is to take the local branch that you pushed to
origin/relocation-issues and "rebase" it onto origin/stable.  If
you have your local branch checked out at the moment, that's
just:

        # Rebase against origin/stable.
        git rebase origin/stable.

        # Probably there are no conflicts from the rebase but if
        # there were then you would fix them, 'git add" the
        # fixes, and "git commit" them.

        # Optional: Look at the list of commits and make sure
        # there is exactly one (the one we just cherry-picked)
        # above origin/stable.
        gitk

        # Push the change to the stable branch.
        git push origin HEAD:stable
-- 
"But hey, the fact that I have better taste than anybody else in the
 universe is just something I have to live with. It's not easy being
 me."
--Linus Torvalds




reply via email to

[Prev in Thread] Current Thread [Next in Thread]