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.
Forge requires MAMP (not MAMP Pro) and does a few things for you:
- Clones [email protected]:username/repo.git project-name into ~/Sites/project-name
- Setups local.project-name.com in MAMP's vhost file and /etc/hosts. If the record is found, Forge skips the step.
- Adds ServerAlias project-name.*.xip.io to MAMP's vhost file. This will allow you to view the local site on your
- mobile device.
- Restarts MAMP.
Think it could be better or is something broken? Submit an issue!
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:
- Understand what it does
- Only run it if you know what you (and the script) are doing