Every Site is a Git repository. You can work on it like any other project.
Clone
hm git clone my-site
cd my-site
There are no SSH keys or passwords. hm signs Git in for you.
Make a change
hm workspace create new-homepage # switches your checkout to its branch
hm preview select new-homepage
# edit, then
git commit -am "New homepage"
git push
Preview updates when you push. When you're happy, hm publish.
Run it on your computer
php -S 127.0.0.1:8080 -t public public/router.php
Pages work locally, but the database, secrets and contact form need the real server.
Good to know
- If your agent also edits the same Workspace, run
git pull --ff-onlybefore you carry on. - A push that adds a migration needs
hm workspace resync NAMEbefore Preview shows it. - Already have a checkout?
hm git link my-siteconnects it.