Docs » Collaborative development

Using wh recreate

At any time you can use the wh recreate sitename command to rebuild your live website locally on your computer. Note that this is not version controlled. It's just a direct download of your site templates and static files from the last time you deployed your website.

Using version control

Webhook works great with any version control software and can be safely used amongst a team of developers or on multiple computers. If you plan to store your Webhook site on a remote repository like Github you'll want to be aware of the following best practices.

Example: Set up a Webhook site using Github so you can work across multiple computers .

Before you try this
Anyone who develops on your Webhook site needs to be listed as an "owner" in the team management settings.

Here is the general flow for setting up a Webhook site for version control so you can work on across multiple computers or as the member of a team.

  1. Run wh create sitename to create your site.
  2. Edit your templates and static files.
  3. Create a new public or private repository on Github, follow the instructions there to git init within your sitename folder and push the code to Github, continuing to push changes as you make them.
  4. On a new computer, git clone the github repository you set up.
  5. Once it's finished downloading, run wh init yoursitename inside your new sitename directory. This will download and install the necessary files to get your cloned site running locally.
  6. Push changes to Github from either computer to keep in sync.

We automatically .gitignore some stuff

By default, Webhook automatically adds the following to your site's .gitignore file. Of note is the .firebase.conffile which contains the secret key to accessing your site's database. You should never give this key out. Other directories like .build and node_modules are there so that multiple devs aren't crossing streams as they make commits.