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

Rafael Laboissiere rafael at debian.org
Thu Apr 30 13:12:34 UTC 2009


* 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.

Happy hacking,

-- 
Rafael



More information about the Pkg-scicomp-devel mailing list