[BioLib-dev] Merging libsequence into main

Pjotr Prins pjotr.public14 at thebird.nl
Sat Aug 1 07:46:48 UTC 2009


On Sat, Aug 01, 2009 at 09:02:19AM +0200, pjotr.public14 at thebird.nl wrote:
>   -- make a backup first of your tree
>   git checkout master_conflict
>   git branch -D master      # delete master
>   git checkout -b master    # create new master
>   git push -f github master # overwrite old master github/origin

The last one does not work, my mistake. The way to delete a remote branch
is
 
    git push github :master

next push (the correct branch) to it
 
    git push github master

OK, new chapter. I am going to show how to revert to an older branch
and bring in later patches.

I just updated my version of libsequence. I removed the
master_conflict branch and checked out your current master_conflict
version on github (which does not contain the bad patch):

    git branch -D master_conflict    # remove old local version
    git checkout --track -b master_conflict origin/master_conflict

next I checked the patches I wrote yesterday, and 'cherry-picked'
them into your branch:

    git log master
    # cherry picking my recent changes
    git cherry-pick 5d01107bcd839e8a5725ec24f5b813311975b663
    (etc.)

then I removed my remote github branch and pushed the latest version.

    git push -f github :master_conflict  # deleting remote repo
    git push -f github master_conflict

Now *my* branch is master_conflict version is clean. So I renamed it
to libsequence again ;-)

    git checkout -b libsequence

Note that your local branch is probably diluted now with the dirty
patches. You need to do something similar to the above starting from
my libsequence branch. Create a new branch (assuming my remote is
named pjotr):

    git checkout -b libsequence pjotr/libsequence

and cherry-pick *your* latest patches from yesterday. Finally push it
to your own tree:

    git push origin libsequence

so I can start pulling from there again.

Is this clear? Again, make backups before starting. It is easy to
remove some work accidentily.

Pj.



More information about the BioLib-dev mailing list