[Bioperl-l] Merge branch 'master' ?

Kai Blin kai.blin at biotech.uni-tuebingen.de
Tue Jun 8 12:25:51 EDT 2010

On Tue, 2010-06-08 at 11:44 -0400, Hilmar Lapp wrote:

> >   git remote add rkhaja git://github.com/rkhaja/bioperl-live.git

This adds rkhaja's github fork of bioperl-live as a remote. You only
need to do this once per repository (read "checkout") and remote.

If this was a new repository, it now has the "origin" remote pointing to
where it was cloned from and the "rkhaja" remote pointing to rkhaja's

> >   git fetch rkhaja

This gets the changes from the rkhaja remote. If you want to keep a lot
of different remotes up-to-date, I suggest using
git remote update
instead, which updates all the remotes.

> >   git checkout -b rkhaja-merge rkhaja/master

This creates a new branch called "rkhaja-merge" based on the "master"
branch in the "rkhaja" remote, and changes to that branch.

> >   git rebase master

This basically removes all the patches from the current branch up to the
point where it diverged from the "master" branch, forwards the current
branch to the tip of the "master" branch and then reapplies all the
patches it removed, so they're now on top of the "master" branch. This
allows you to do a fast-forward push of them later (read, no need to do
a merge commit).

> >   git checkout master

This switches back to the master branch.

> >   git merge rkhaja-merge

This now merges over the changes of the "rkhaja-merge" branch. As all of
these changes are on top of the current branch, they can be
fast-forwarded to, no merge commit is created.

> >   git branch -d rkhaja-merge

This removes the rkhaja-merge branch, to clean up. git branch -d will
refuse to delete a branch that has objects not in your current branch,
forcing you to use git br -D instead if you really know what you're

> When this gets adopted and documented, it'd be really great to  
> annotate each line with what it is motivated by (i.e., why do this),  
> as otherwise this sequence reads rather obtuse to probably most people  
> except the fully git initiated.


Dipl.-Inform. Kai Blin         kai.blin at biotech.uni-tuebingen.de
Interfakultäres Institut für Mikrobiologie und Infektionsmedizin
Abteilung Mikrobiologie/Biotechnologie
Eberhard-Karls-Universität Tübingen
Auf der Morgenstelle 28                 Phone : ++49 7071 29-78841
D-72076 Tübingen                        Fax : ++49 7071 29-5979
Homepage: http://www.mikrobio.uni-tuebingen.de/ag_wohlleben

More information about the Bioperl-l mailing list