Sunday, April 7, 2013

Freezing a deployable github repository

So here is my issue

This is about using github in a heroku style, and being able to keep versions of the repository as deployed sites.
So how to do that:

Lets assume that you have a repository e.g. https://github.com/ogt/boxchareditor that is "github deployable". Ie there is just one branch gh-pages - git push updates a live running site http://ogt.githb.io/boxchareditor in addition to updating the github repo.

So lets say that you want to keep a particular version as a referacable deployed url.

How do you do that:

> hub clone boxchareditor boxchareditor-1
> cd !$
> perl -p -i -e 's,ogt/boxchareditor,ogt/boxchareditor-1,g' * 
> git add .
> git commit -m 'changed links to repo to point to own repo'
> git remote -rm origin
> hub create -h http://ogt.github.io/boxchareditor-1
> git push origin gh-pages

I think I will make it a mini utility

> gitfreeze reponame freezedreponame



No comments:

Post a Comment