Posts Tagged ‘Git’

No need for touching restart.txt. A tip for Passenger users

Monday, February 2nd, 2009

Natham writes about this tip I found today. This one helps to speed up the deployment with Passenger a little bit. In your Capistrano, Vlad, etc, you probably have a step that runs:


touch tmp/restart.txt

This is needed, so Passenger (mod_rails) is able to know when it should restart itself. Now, think about this:

Commit “tmp/restart.txt” to your Git repository.

This way you’ll never have to touch tmp/restart.txt again. This will be deleted when Passenger notices it. And on the next deployment, it’ll be rewritten again, with your deploy script (Capistrano/etc), that probably runs something like “git reset; git pull”, and Passenger will notices again, restart. And so forth.

Clever, isn’t? :)

Source: A tip for Passenger(mod_rails) users by Nathan.

What to do when GitHub goes down

Friday, November 28th, 2008

What if my GitHub repository is corrupted or deleted?

Don’t Panic! Because of the distributed nature of git, everyone always has a local full copy of the repository, complete with history. Any of your repositories, assuming they have been kept up to date, can be uploaded to the GitHub repository with no loss of data.

Read the full article.