2023-12-04 07:25:35 +00:00
---
title: Setting up your GitHub repository
---
First, make sure you have Quartz [[index#🪴 Get Started|cloned and setup locally]].
Then, create a new repository on GitHub.com. Do **not** initialize the new repository with `README` , license, or `gitignore` files.
![[github-init-repo-options.png]]
At the top of your repository on GitHub.com's Quick Setup page, click the clipboard to copy the remote repository URL.
![[github-quick-setup.png]]
2023-12-15 00:48:09 +00:00
In your terminal of choice, navigate to the root of your Quartz folder. Then, run the following commands, replacing `REMOTE-URL` with the URL you just copied from the previous step.
2023-12-04 07:25:35 +00:00
```bash
2023-12-15 00:48:09 +00:00
# add your repository
2023-12-04 07:25:35 +00:00
git remote add origin REMOTE-URL
2023-12-15 00:48:09 +00:00
# track the main quartz repository for updates
git remote add upstream https://github.com/jackyzha0/quartz.git
2023-12-04 07:25:35 +00:00
```
To verify that you set the remote URL correctly, run the following command.
```bash
git remote -v
```
Then, you can sync the content to upload it to your repository.
```bash
npx quartz sync
```
2023-12-16 19:04:18 +00:00
> [!hint]
> If `npx quartz sync` fails with `fatal: --[no-]autostash option is only valid with --rebase`, you
> may have an outdated version of `git`. Updating `git` should fix this issue.