[Lazarus] Git mirror of Lazarus SubVersion repository is available

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Apr 10 04:48:01 CEST 2009

Something I forgot to mention in my first post....

I'll start a wiki page describing an example workflow and Git usage
with the Lazarus mirror.

>     $ git checkout -b work origin/upstream
> ...this creates a new branch called 'work' which tracks the
> original SVN trunk branch and also allows you to create your
> own custom changes or bug fixes. That's the one MOST users would
> want!
> Now to keep up to date with what's happening in SVN trunk, git
> 'upstream' branch, you simply need to run the following git command
> to update your local repository.
>    $ git pull

This will update your local repository, but it will not automatically
update your local branch. Remember we created a 'work' branch which is
local to our repository. So to update our local 'work' branch with the
'upstream' branch we use the rebase command.

     $ git rebase origin/upstream

The 'git pull' already fetched the changes from GitHub. the 'git
rebase' simply replays all new commits from the 'upstream' branch into
our 'work' branch.

This is quite nice, because your 'work' is only updated when you say
so. So if you find a revision that is nice and stable for you, you can
continue pull in all new change from GitHub, but your local branch
still stays nice and stable. You can then cherry-pick and new patches
you want to merge with your branch (for example testing a specific
fix), or rebase your branch with the last code from 'upsteam' (which
is svn trunk).

So in summary, I can keep my repository (upstream branch) up to date
with svn trunk, but I don't necessarily have to immediately use that
new revision. I can review the changes first.  This is how I mostly
work with Lazarus. When I find a stable revision in svn trunk, I stick
with it for a while (after all, I write commercial software with
Lazarus IDE, so I must always be able to do my work).

And if I get a request to retest a bug report with the latest lazarus
from svn trunk. I can quickly create a new temporary local branch
which is in sync with 'upstream', test the new feature and report back
to Mantis. Then switch back to my trusty stable 'work' branch and
delete the temporary branch I just created.

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the Lazarus mailing list