Monthly Archives for May 2008
11
MAY
Git & git-export
Posted by Adam Posted in Programming and Software 0 comments
Over the last few months there has been a lot of talk on the internet about Git – a distributed version control system which seems to be becoming ever more popular within the Rails community. Because of this, I thought I’d follow (sheep like?) the trend and look at moving some of my projects into git repositories. I have started doing this and am now a proud, fully-paid-up, member of github (a nice little git repo hosting service). I do plan to setup my own remote git “store” in the future, but for now, until I have the time to transfer all our subversion content to git – github will do nicely for my current projects.
I could go on about how git is different to SVN and so on, but this topic has been covered to death on the internet so I won’t, but, what I do want to let you see is a quick ruby script I knocked together to simulate the behaviour of svn export http://svn.domain.com/myrepo in git. This takes the form of git-export my_repo git://mydomain.com/repo.git my_branch
You can check it out in my new github account at http://github.com/adamcooke/git-exporter/tree/master/exporter.rb – I have copied it to /usr/local/git/bin/git-export so I can simply run git-export from anywhere on my system.
If your reading this and have any suggestions to improve it, please don’t hesitate to fork the repo and send it over :)