Work in your own Git checkout

Clone a Site and use your own editor, then push to update Preview.

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-only before you carry on.
  • A push that adds a migration needs hm workspace resync NAME before Preview shows it.
  • Already have a checkout? hm git link my-site connects it.