Skip to content

Commit 415073a

Browse files
committed
ref: get/import/list updates
extracted from #2302
1 parent d5f284a commit 415073a

File tree

4 files changed

+31
-28
lines changed

4 files changed

+31
-28
lines changed

content/docs/command-reference/get.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ repository (e.g. source code, small image/other files). `dvc get` copies the
2424
target file or directory (found at `path` in `url`) to the current working
2525
directory. (Analogous to `wget`, but for repos.)
2626

27+
> See `dvc list` for a way to browse repository contents to find files or
28+
> directories to download.
29+
2730
> Note that unlike `dvc import`, this command does not track the downloaded
2831
> files (does not create a `.dvc` file). For that reason, it doesn't require an
2932
> existing DVC project to run in.
3033
31-
> See `dvc list` for a way to browse repository contents to find files or
32-
> directories to download.
33-
3434
The `url` argument specifies the address of the DVC or Git repository containing
3535
the data source. Both HTTP and SSH protocols are supported (e.g.
3636
`[user@]server:project.git`). `url` can also be a local file system path

content/docs/command-reference/import-url.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ changed (see `dvc update`).
5151
💡 The `--to-remote` option lets you store an import on a
5252
[DVC remote](/doc/command-reference/remote) without using the local file system.
5353

54-
> Note that the imported data can be [pushed](/doc/command-reference/push) to
55-
> remote storage normally.
54+
> Note that data imported from external locaitons can be
55+
> [pushed](/doc/command-reference/push) and
56+
> [pulled](/doc/command-reference/pull) to/from
57+
> [remote storage](/doc/command-reference/remote) normally (unlike for
58+
> `dvc import`).
5659
5760
`.dvc` files support references to data in an external location, see
5861
[External Dependencies](/doc/user-guide/external-dependencies). In such an

content/docs/command-reference/import.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ target file or directory (found at `path` in `url`), and tracks it in the local
2727
project. This makes it possible to update the import later, if the data source
2828
has changed (see `dvc update`).
2929

30-
> Note that `dvc get` corresponds to the first step this command performs (just
31-
> download the data).
32-
3330
> See `dvc list` for a way to browse repository contents to find files or
3431
> directories to import.
3532
33+
> Note that `dvc get` corresponds to the first step this command performs (just
34+
> download the data).
35+
3636
The imported data is <abbr>cached</abbr>, and linked (or copied) to the current
3737
working directory with its original file name e.g. `data.txt` (or to a location
3838
provided with `--out`). An _import `.dvc` file_ is created in the same location
3939
e.g. `data.txt.dvc` – similar to using `dvc add` after downloading the data.
4040

41-
(ℹ️) DVC won't push or pull imported data to/from
42-
[remote storage](/doc/command-reference/remote), it will rely on it's original
43-
source.
41+
(ℹ️) DVC won't push or pull data imported from other DVC repos to/from
42+
[remote storage](/doc/command-reference/remote). `dvc pull` will download from
43+
the original source instead.
4444

4545
The `url` argument specifies the address of the DVC or Git repository containing
4646
the data source. Both HTTP and SSH protocols are supported (e.g.

content/docs/command-reference/list.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# list
22

3-
List repository contents, including files, models, and directories tracked by
4-
DVC (as <abbr>outputs</abbr>) and by Git.
3+
List project contents, including files, models, and directories tracked by DVC
4+
and by Git.
5+
6+
> Useful to find data to `dvc get`, `dvc import`, or for `dvc.api` functions.
57
68
## Synopsis
79

@@ -16,17 +18,15 @@ positional arguments:
1618

1719
## Description
1820

19-
A side-effect of DVC is that it hides actual data paths, by effectively
20-
replacing files and directories with <abbr>DVC files</abbr>. So you don't see
21-
data files/dirs when you browse a <abbr>DVC repository</abbr> on Git hosting
22-
(e.g. GitHub), you just see the `dvc.yaml` and `.dvc` files. This can make it
23-
hard to navigate the project, for example to find files or directories for use
24-
with `dvc get`, `dvc import`, or `dvc.api` functions.
21+
Produces a view of a <abbr>DVC repository</abbr> (usually online), listing data
22+
files and directories tracked by DVC alongside the remaining Git repo contents.
23+
This is useful because when you browse a hosted repository (e.g. on GitHub or
24+
with `git ls-remote`), you only see the `dvc.yaml` and `.dvc` files with your
25+
code (files tracked by Git).
2526

26-
This command produces a view of a DVC repository, as if files and directories
27-
tracked by DVC were found directly in the Git repo. Its output is equivalent to
28-
cloning the repo and [pulling](/doc/command-reference/pull) the data (except
29-
that nothing is downloaded by `dvc list`), like this:
27+
This command's output is equivalent to cloning the repo and
28+
[pulling](/doc/command-reference/pull) the data (except that nothing is
29+
downloaded), like this:
3030

3131
```dvc
3232
$ git clone <url> example
@@ -35,17 +35,17 @@ $ dvc pull
3535
$ ls <path>
3636
```
3737

38-
Only the root directory is listed by default, but the `-R` option can be used to
39-
list files recursively.
40-
4138
The `url` argument specifies the address of the DVC or Git repository containing
4239
the data source. Both HTTP and SSH protocols are supported (e.g.
4340
`[user@]server:project.git`). `url` can also be a local file system path
4441
(including the current project e.g. `.`).
4542

4643
The optional `path` argument is used to specify a directory to list within the
47-
source repository at `url` (including paths inside tracked directories). It's
48-
similar to providing a path to list to commands such as `ls` or `aws s3 ls`.
44+
Git repo at `url` (including paths inside tracked directories). It's similar to
45+
providing a path to list to commands such as `ls` or `aws s3 ls`.
46+
47+
Only the root directory is listed by default, but the `-R` option can be used to
48+
list files recursively.
4949

5050
Please note that `dvc list` doesn't check whether the listed data (tracked by
5151
DVC) actually exists in remote storage, so it's not guaranteed whether it can be

0 commit comments

Comments
 (0)