We're a Web Design and Drupal Development company based in Middlesbrough, UK. We specialise in easy to use Content Management Systems and E-commerce websites.

Migrating Development of a TextMate Bundle to GitHub

Picture for psynaptic

Development of TextMate bundles has recently migrated from svn to git but since the PHP Drupal bundle is still in Review status it wasn't migrated with the other bundles.

These instructions are intended for bundle maintainers in the same situation to ease the process of migrating your TextMate bundles to GitHub.

Let's get started...

1. Checkout the bundle from svn

svn co http://svn.textmate.org/trunk/Review/Bundles/[bundle].tmbundle/

2. Find the svn commit names for all users

svn log

Write down all the users who've committed to the bundle.

3. Create an authors.txt file

Contact the svn committers and get their GitHub names and email addresses.

The format of the authors.txt file should be:

psynaptic = Richard Burford <github@example.com>
weitzman = Moshe Weitzman <github@example.com>
kkaefer = Konstantin Käfer <github@example.com>

If you can't get hold of the svn committers you can use «nick»@svn.textmate.org instead.

4. Clone the svn repo using git-svn

git svn clone -q -Aauthors.txt -T"/trunk/Review/Bundles/[bundle].tmbundle" http://svn.textmate.org "Bundles/[bundle].tmbundle"

This could take a while depending on how much history exists in svn for the bundle. In the case of the PHP Drupal bundle it took less than 5 minutes.

It goes without saying that once this is complete you will have a local git repo that matches your svn repo.

5. Setup a project on GitHub

If you haven't done this already, the next thing you need to do is create a new repository on GitHub.

Following the naming conventions of the other TextMate bundles on github and allan's blog post on the matter, project names should be lowercase with hyphens replacing spaces and must end in .tmbundle. Keeping the tmbundle extension in the project name makes it possible for automated bundle tools to be able to find the TextMate bundles.

This is what I did for the PHP Drupal bundle:

6. Setup a remote and push to GitHub

cd Bundles/[bundle].tmbundle
git remote add origin git@github.com:[username]/[bundle].tmbundle.git
git push origin master

The speed of git is one of the huge benefits, the push only took about 10 seconds on my machine.

7. Rejoice

If all went well you should now have your bundle hosted at GitHub. Users will be able to download the bundle without needing to have subversion, or even git, installed. Development will be much more fun with git and you have the added bonus of all the other useful tools GitHub provides for free.

Posted by psynaptic

Recent Clients

Drupal Developer Reference

Screenshot of DrupalContrib API

DrupalContrib API was created by Freestyle Systems for Drupal developers who need access to reference documentation for Drupal's most popular contributed modules.

If you're a Drupal developer you'll no doubt find our resource invaluable!

Drupal Association

Drupal Association Organization member