From 2f2c4ff4fbf36404b8f7de564a9ae48c63f9903e Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sat, 19 Aug 2023 22:19:49 -0700 Subject: [PATCH] docs: make setting upstream more clear, docs on npx quartz restore --- content/migrating from Quartz 3.md | 6 ++++++ content/upgrading.md | 3 +++ 2 files changed, 9 insertions(+) diff --git a/content/migrating from Quartz 3.md b/content/migrating from Quartz 3.md index 3b6f9259..d9e3a1d3 100644 --- a/content/migrating from Quartz 3.md +++ b/content/migrating from Quartz 3.md @@ -12,6 +12,12 @@ npm i npx quartz create ``` +If you get an error like `fatal: 'upstream' does not appear to be a git repository`, make sure you add `upstream` as a remote origin: + +```shell +git remote add upstream https://github.com/jackyzha0/quartz.git +``` + When running `npx quartz create`, you will be prompted as to how to initialize your content folder. Here, you can choose to import or link your previous content folder and Quartz should work just as you expect it to. > [!note] diff --git a/content/upgrading.md b/content/upgrading.md index a4c2d4a9..a3a82754 100644 --- a/content/upgrading.md +++ b/content/upgrading.md @@ -13,4 +13,7 @@ npx quartz update As Quartz uses [git](https://git-scm.com/) under the hood for versioning, updating effectively 'pulls' in the updates from the official Quartz GitHub repository. If you have local changes that might conflict with the updates, you may need to resolve these manually yourself (or, pull manually using `git pull origin upstream`). +> [!hint] +> Quartz will try to cache your content before updating to try and prevent merge conflicts. If you get a conflict mid-merge, you can stop the merge and then run `npx quartz restore` to restore your content from the cache. + If you have the [GitHub desktop app](https://desktop.github.com/), this will automatically open to help you resolve the conflicts. Otherwise, you will need to resolve this in a text editor like VSCode. For more help on resolving conflicts manually, check out the [GitHub guide on resolving merge conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line#competing-line-change-merge-conflicts).