[Buildd-tools-devel] GIT migration complete; SVN repository obsolete

Roger Leigh rleigh at whinlatter.ukfsn.org
Sat Sep 15 20:35:24 UTC 2007


Hi folks,

Over the last week, I have been experimenting with converting the
existing Subversion repository to GIT.  Over the last two days, I have
done a complete conversion using git-svn, and a bit of manual
re-tagging.  The GIT repository is now online and ready for use.
** NOTE: NEW COMMITS TO THE SVN REPOSITORY WILL BE LOST. **

The resulting GIT repositories are available from
git.debian.org/git/buildd-tools.

To check out a copy anonymously:

  git clone git://git.debian.org/git/buildd-tools/buildd.git buildd
  git clone git://git.debian.org/git/buildd-tools/sbuild.git sbuild
  git clone git://git.debian.org/git/buildd-tools/schroot.git schroot

Or, if you have write access:

  git clone git+ssh://git.debian.org/git/buildd-tools/buildd.git buildd
  git clone git+ssh://git.debian.org/git/buildd-tools/sbuild.git sbuild
  git clone git+ssh://git.debian.org/git/buildd-tools/schroot.git schroot

Online repository browser:

  http://git.debian.org/?p=buildd-tools/buildd.git;a=summary
  http://git.debian.org/?p=buildd-tools/sbuild.git;a=summary
  http://git.debian.org/?p=buildd-tools/schroot.git;a=summary


If you haven't used git before, here are a few sample commands:

% cd /tmp
% git clone git://git.debian.org/git/buildd-tools/schroot.git schroot
Initialized empty Git repository in /tmp/schroot/.git/
remote: Generating pack...
remote: Done counting 7455 objects.
remote: Deltifying 7455 objects...
remote:  100% (7455/7455) done
Indexing 7455 objects...
remote: Total 7455 (delta 6122), reused 7455 (delta 6122)
 100% (7455/7455) done
Resolving 6122 deltas...
 100% (6122/6122) done

% cd schroot
% git status
# On branch master
nothing to commit (working directory clean)

 git tag -l
schroot-0.1.0
schroot-0.1.1
schroot-0.1.2
[...]
schroot-1.1.3
schroot-1.1.4
schroot-1.1.5

# Local branches
% git branch
* master

# Remote branches
% git branch -r
  origin/HEAD
  origin/master
  origin/schroot-1.0

# Checkout (and branch locally, tracking remote changes) schroot 1.0 branch
% git checkout -b schroot-1.0 --track origin/schroot-1.0
Branch schroot-1.0 set up to track remote branch refs/remotes/origin/schroot-1.0.
Switched to a new branch "schroot-1.0"
% git status
# On branch schroot-1.0
nothing to commit (working directory clean)

Note, use "git pull" as you would "svn update".  Once you have
modified or added files, and want to commit them, you add them to the
"index", which is a kind of staging area where you put things prior to
committing them.  Use "git add" to add files to commit to the index,
"git rm [--cached]" to remove them and then "git commit" to commit
them.  This is exactly the same as "svn commit", but because git is
distributed, the commit only affects your local repository.  Use "git
push" to push your changes back to the central repository you cloned
from.  "git help <command>" gives the manual page for each command.

Note that unlike Subversion, you can branch and commit and do
everything you normally would do with a cloned read-only repository.
The only restriction is that you can't push changes back.  Therefore,
anyone can hack on buildd-tools without any special privileges--these
are only needed to update the master copy.  As a result, it's easy to
create local customised branches and track and merge upstream changes.

Unlike with CVS and SVN, branching and merging is easy and encouraged.
It's simple to make a local branch ("git checkout -b") for your work,
and then merge it back onto the main branch (normally "master").  You
can switch rapidly between branches (and tags) just by checking them
out, all in the same directory.  Also note the "gitk" tool is a simple
GIT browser which can be handy.

Tagging is as easy as "git tag <tag>", and I have tagged all the
official releases with "git tag -s" which GPG signs them to allow
validation of each release and all prior history.

I'm still getting to know GIT myself, having used it for my personal
work projects over the last month.  It appears to be very nice, but
there may well be teething troubles.  Please let me know if you find
any bugs, for example with the conversion or with making changes.
Hopefully, this should be a fun experience for all!


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20070915/b82f9ebe/attachment.pgp 


More information about the Buildd-tools-devel mailing list