UndieGravity LogoUndiegravity

How to Clone a Website Template from GitHub (3 Ways)

Three ways to get a template from GitHub: Download ZIP with no tools, git clone for local work, or fork to keep your own copy online. Step by step.

By UndieGravity, , 2 min read

Every UndieGravity template lives in a public GitHub repository. There are three ways to get it onto your computer, from no tools at all to the full developer workflow. Pick the one that fits how you plan to work.

Option 1: Download ZIP (no tools needed)

  1. Open the template page and click the GitHub button.
  2. On GitHub, click the green Code button.
  3. Choose Download ZIP and unzip the file.

This is the quickest way to look at an HTML template or try one out. The downside: there is no history and no easy way to get later updates.

Install Git from git-scm.com if you do not have it. Then copy the repository URL from the Code button and run:

git clone https://github.com/OWNER/TEMPLATE-NAME.git my-site
cd my-site

The last argument, my-site, is the folder name; use your project's name. You now have the full project with its history.

Start fresh history for your own project

Your site is a new project, so you usually do not want the template's commit history. Remove it and start your own:

rm -rf .git        # on Windows PowerShell: Remove-Item -Recurse -Force .git
git init
git add .
git commit -m "Start from template"

Option 3: Fork on GitHub

Click Fork on the repository page to make a copy under your own GitHub account. This is handy if you want to deploy straight from GitHub to Vercel or Netlify without using the command line. Note that a fork of a public repository stays public.

After you have the code

  • HTML template: open index.html in your browser. That is it.
  • React or Next.js template: install Node.js, then run npm install and npm run dev. The README lists the exact commands.
  • Read the README first: it lists required environment variables and anything specific to that template.

Common problems

  • git: command not found: Git is not installed or the terminal needs restarting after installing.
  • npm: command not found: install Node.js, which includes npm.
  • Permission denied when cloning: you used an SSH URL without an SSH key. Use the HTTPS URL instead.

You may use any UndieGravity template in personal and client projects. Just do not resell the template itself. See the terms.

Keep reading