Forge - Local environments in a snap

Posted on April 15, 2013

I clone Git repos frequently. I also need to preview these repos in my desktop and mobile browsers. If you do this often, you may be interested in Forge.

A demo of Forge cloning and setting up project URLs

Forge requires MAMP (not MAMP Pro) and does a few things for you:

  1. Clones [email protected]:username/repo.git project-name into ~/Sites/project-name
  2. Setups in MAMP's vhost file and /etc/hosts. If the record is found, Forge skips the step.
  3. Adds ServerAlias project-name.* to MAMP's vhost file. This will allow you to view the local site on your
  4. mobile device.
  5. Restarts MAMP.

Think it could be better or is something broken? Submit an issue!

Obligatory warning:

I am not responsible for any harm done to your machine. This is a semi-complicated script that performs a number of tasks. You should:

  1. Understand what it does
  2. Only run it if you know what you (and the script) are doing