Export from Git for Drupal site releases

I'm used to how svn export works, and have used this in a number of release scripts.

Git doesn't quite have an equivalent

There is

git archive

Which creates a tarball rather than a set of files, and while you can export a subset of the repository you still get the full path in the tarball.

and

git checkout-index

Which creates a set of files (these can be locate outside the working copy) but requires a local repository.

Read more

Import an svn repository to git

You'll need to have git and git-svn installed.

The code samples are run in bash on Linux.

Initial Import

The import process can be slow if you have a lot of history to import as git-svn has to pull in every single revision individally. I've found it worthwhile creating a tiny svn repository to practice with as imports are quick and mistakes cheap.

mkdir mynewgitrepo
cd mynewgitrepo
git svn init <svn repo url>  --tags=tags --branches=branches --trunk=trunk --prefix=svn
git svn fetch  # this takes ages

Read more

Is git now a mature toolset?

I've been looking into git for a while, the core toolset has been mature for ages but it just didn't seem to have the wider support I wanted.

Now I look again and the egit plugin for eclipse has improved massively with full eclipse integration http://wiki.eclipse.org/EGit/User_Guide

There is a git plugin for trac http://trac-hacks.org/wiki/GitPlugin

It looks like it's time for me to dive into git properly :-)

Read more

Adding more data types to schema API for Drupal 7

I've written a patch for Drupal 7 to enable date and time data types to be defined for the schema API.

http://drupal.org/node/200953

There seems to be some resistance to this idea due to concerns about compatibility between database versions (Drupal now supports MySQL, PostgreSQL and sqlite).

Personally I don't think Drupal can afford to work at lowest common denominator level if the aim is to be a serious option for the enterprise

Read more

version control with Git

I've been intrigued by git for a while, but as a long time user of svn I'm kinda cautious about moving on.

So today I had some time and used it to read up on the pros and cons, as well as try things out a bit.

It seems to me that git is clearly the better system; but that svn has the advantage of maturity.

Git in itself seems to have grown up, it's just that the supporting infrastructure and developer experience is still limited.

Read more