[Pkg-scicomp-devel] Migrating some repositories to Git

Ondrej Certik ondrej at certik.cz
Thu Apr 30 15:50:49 UTC 2009


On Thu, Apr 30, 2009 at 6:12 AM, Rafael Laboissiere <rafael at debian.org> wrote:
> * Christian T. Steigies <cts at debian.org> [2009-04-30 13:57]:
>
>> Can you document the perfect workflow with git? I have tried darcs, and git,
>> and bzr, and I am not really sure which to use for myself. I am still
>> struggling with building from svn (svn-buildpackage does not work like
>> darcs-buildpackage, at least for me), and I am not really a git fan yet.
>
> I do not yet use git-buildpackage.  I may give it a try in the future.
> Here is the minimal workflow I do to build my package right now
> (including the cloning from the remote repo):
>
>    $ PKG=src-package-name
>    $ VER=some-version
>    $ tar xfz ${PKG}_$VER.orig.tar.gz
>    $ cd $PKG-$VER
>    # The following is equivalent to svn checkout
>    $ git clone ssh://alioth.debian.org/git/pkg-scicomp/$PKG.git .
>    # Edit debian/* files
>    $ debuild -i
>    $ dupload
>    $ git commit -a -m "Debian release ${PKG}_$VER-1"
>    $ git push # equivalent to svn commit
>
> Once the repo is cloned, update the local one with "git pull" (this is
> equivalent to "svn update").
>
> Of course, you can do tones of things with git and there are plenty of
> good tutorials on the web.  In particular, I omitted the great "git add"
> command above (this is compensated by the "-a" option to "git commit").
> Specially interesting is the "git add -i" command.  Having the ability to
> select the hunks to be committed in a fine-grained fashion is cool.
>
> Also, "git branch" and "git checkout" for working with branches, as well
> as "git tag" for tags are infinitely superior than their equivalent in
> SVN.

I very strongly suggest to use git-buildpackage and store the upstream
source in the git repository itself, and use pristine-tar. I will do
that for my packages, if all the other uploaders agree. The big
advantage of this approach is that creating Debian specific patches is
super easy --- you just change the files in the "debian" branch.
Thanks to git, you can always easily merge the patches if new upstream
is released. No need to hassle with the debian/patches directory.


Ondrej



More information about the Pkg-scicomp-devel mailing list