From 0a631f95d48b2b536dd2de479453e9e710b3a69c Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Tue, 1 Mar 2022 12:13:07 -0600 Subject: [PATCH] start: tabs for Windows cmd blocks (Versioning page) (#3273) * start: use `powershell` highligher for tab toggles per https://github.com/iterative/dvc.org/pull/3215#discussion_r804630813 * start: Windows command tabs for Versioning page * start: use `dvc` highlighter (and `$`) for Windows cmd blocks per https://github.com/iterative/dvc.org/pull/3273#pullrequestreview-880403668 * start: Windows code blocks for /tmp location * Apply suggestions from code review --- .../docs/start/data-and-model-versioning.md | 55 +++++++++++++------ 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/content/docs/start/data-and-model-versioning.md b/content/docs/start/data-and-model-versioning.md index c6c2a6942b..bc4efcb6a7 100644 --- a/content/docs/start/data-and-model-versioning.md +++ b/content/docs/start/data-and-model-versioning.md @@ -64,11 +64,11 @@ The data, meanwhile, is listed in `.gitignore`. ### 💡 Expand to see what happens under the hood. `dvc add` moved the data to the project's cache, and -linked it back to the workspace. +linked it back to the workspace. The `.dvc/cache` +should look like this: -```dvc -$ tree .dvc/cache -../.dvc/cache +``` +.dvc/cache └── a3    └── 04afb96060aad90176268345e10355 ``` @@ -114,14 +114,27 @@ $ git commit -m "Configure remote storage" DVC remotes let you store a copy of the data tracked by DVC outside of the local cache (usually a cloud storage service). For simplicity, let's set up a _local -remote_: +remote_ in a temporary `dvcstore/` directory (create the dir first if needed): + + + ```dvc -$ mkdir -p /tmp/dvcstore $ dvc remote add -d myremote /tmp/dvcstore $ git commit .dvc/config -m "Configure local remote" ``` + + + +```dvc +$ dvc remote add -d myremote %TEMP%\dvcstore +$ git commit .dvc\config -m "Configure local remote" +``` + + + + > While the term "local remote" may seem contradictory, it doesn't have to be. > The "local" part refers to the type of location: another directory in the file > system. "Remote" is what we call storage for DVC projects. It's @@ -141,16 +154,12 @@ files. ### 💡 Expand to see what happens under the hood. `dvc push` copied the data cached locally to the remote storage we -set up earlier. You can check that the data has been stored in the DVC remote -with: - -```dvc -$ ls -R /tmp/dvcstore -/tmp/dvcstore/: -a3 +set up earlier. The remote storage directory should look like this: -/tmp/dvcstore/a3: -04afb96060aad90176268345e10355 +``` +.../dvcstore +└── a3 +   └── 04afb96060aad90176268345e10355 ``` @@ -177,7 +186,7 @@ $ rm -f data/data.xml ``` - + ```dvc $ rmdir .dvc\cache @@ -209,11 +218,25 @@ latest version: Let's say we obtained more data from some external source. We can pretend this is the case by doubling the dataset: + + + ```dvc $ cp data/data.xml /tmp/data.xml $ cat /tmp/data.xml >> data/data.xml ``` + + + +```dvc +$ copy data\data.xml %TEMP%\data.xml +$ type %TEMP%/data.xml >> data\data.xml +``` + + + + ```dvc