Skip to content

Commit

Permalink
fix: set upstream in sync handler, cleanup docs around setting up github
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Dec 15, 2023
1 parent a464ae5 commit c35818c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/setting up your GitHub repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ At the top of your repository on GitHub.com's Quick Setup page, click the clipb

![[github-quick-setup.png]]

In your terminal of choice, navigate to the root of your Quartz folder. Then, run the following command, replacing `REMOTE-URL` with the URL you just copied from the previous step.
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.

```bash
# add your repository
git remote add origin REMOTE-URL

# track the main quartz repository for updates
git remote add upstream https://github.com/jackyzha0/quartz.git
```

To verify that you set the remote URL correctly, run the following command.
Expand Down
2 changes: 1 addition & 1 deletion quartz/cli/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ export async function handleSync(argv) {
await popContentFolder(contentFolder)
if (argv.push) {
console.log("Pushing your changes")
const res = spawnSync("git", ["push", "-f", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], {
const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], {
stdio: "inherit",
})
if (res.status !== 0) {
Expand Down

0 comments on commit c35818c

Please sign in to comment.