Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start: tabs for Windows cmd blocks (Versioning page) #3273

Merged
merged 7 commits into from
Mar 1, 2022
55 changes: 39 additions & 16 deletions content/docs/start/data-and-model-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <abbr>cache</abbr>, and
<abbr>linked</abbr> it back to the <abbr>workspace</abbr>.
<abbr>linked</abbr> it back to the <abbr>workspace</abbr>. The `.dvc/cache`
should look like this:

```dvc
$ tree .dvc/cache
../.dvc/cache
```
.dvc/cache
└── a3
   └── 04afb96060aad90176268345e10355
```
Expand Down Expand Up @@ -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):

<toggle>
<tab title="Mac/Linux">

```dvc
$ mkdir -p /tmp/dvcstore
$ dvc remote add -d myremote /tmp/dvcstore
$ git commit .dvc/config -m "Configure local remote"
```

</tab>
<tab title="Windows Cmd">
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

```dvc
$ dvc remote add -d myremote %TEMP%\dvcstore
$ git commit .dvc\config -m "Configure local remote"
```

</tab>
</toggle>

> 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 <abbr>DVC projects</abbr>. It's
Expand All @@ -141,16 +154,12 @@ files.
### 💡 Expand to see what happens under the hood.

`dvc push` copied the data <abbr>cached</abbr> 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
```

</details>
Expand All @@ -177,7 +186,7 @@ $ rm -f data/data.xml
```

</tab>
<tab title="Windows">
<tab title="Windows Cmd">

```dvc
$ rmdir .dvc\cache
Expand Down Expand Up @@ -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:

<toggle>
<tab title="Mac/Linux">

```dvc
$ cp data/data.xml /tmp/data.xml
$ cat /tmp/data.xml >> data/data.xml
```

</tab>
<tab title="Windows Cmd">
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

```dvc
$ copy data\data.xml %TEMP%\data.xml
$ type %TEMP%/data.xml >> data\data.xml
```

</tab>
</toggle>

</details>

```dvc
Expand Down