---
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]]
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.
# list all the repositories that are tracked
git remote -v
# if the origin doesn't match your own repository, set your repository as the origin
git remote set-url origin REMOTE-URL
# if you don't have upstream as a remote, add it so updates work
git remote add upstream https://github.com/jackyzha0/quartz.git
Then, you can sync the content to upload it to your repository. This is a helper command that will do the initial push of your content to your repository.
npx quartz sync --no-pull
[!warning]-
fatal: --[no-]autostash option is only valid with --rebase
You may have an outdated version ofgit. Updatinggitshould fix this issue.[!warning]-
fatal: The remote end hung up unexpectedly
It might be due to Git's default buffer size. You can fix it by increasing the buffer with this command:git config http.postBuffer 524288000
In future updates, you can simply run npx quartz sync every time you want to push updates to your repository.
[!hint] Flags and options
For full help options, you can runnpx quartz sync --help.Most of these have sensible defaults but you can override them if you have a custom setup:
-dor--directory: the content folder. This is normally justcontent-vor--verbose: print out extra logging information--commitor--no-commit: whether to make agitcommit for your changes--pushor--no-push: whether to push updates to your GitHub fork of Quartz--pullor--no-pull: whether to try and pull in any updates from your GitHub fork (i.e. from other devices) before pushing