Instructions from a Macbook pro running OSX 10.10
Either checkout an existing repostiory or create a new one.
Existing:
git clone git@github.com:shrunyan/REPONAME.git PROCJECTNAME/
New:
mkdir /Users/USERNAME/Sites/PROJECTNAME
cd PROJECTNAME
git init
sudo vi /etc/apache2/extra/httpd-vhosts.conf
This is a very basic virtual host. There are many other options that can be supplied per website.
<VirtualHost *:80>
ServerAdmin me@stuartrunyan.com
DocumentRoot "/Users/USERNAME/Sites/PROJECTNAME/www"
ServerName PROJECTNAME.dev
ServerAlias www.PROJECTNAME.dev
</VirtualHost>
I like to have my site live inside of a www directory in my repository. That way I can have root level assets which aren't available to be served. eg. config files, readme, etc...
sudo vi /etc/hosts
We will need an entry for "www" and non.
127.0.0.1 PROJECTNAME.dev
127.0.0.1 www.PROJECTNAME.dev