Skip to content

Commit a0292ef

Browse files
committed
cmd: add granularity example to status
rel iterative/dvc#4191 (comment)
1 parent 06fe612 commit a0292ef

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

β€Žcontent/docs/command-reference/status.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ workspace) is different from remote storage. Bringing the two into sync requires
137137

138138
- `-v`, `--verbose` - displays detailed tracing information.
139139

140-
## Example: Simple usage
140+
## Examples
141141

142142
```dvc
143143
$ dvc status
@@ -160,6 +160,24 @@ This shows that for stage `bar.dvc`, the dependency `foo` and the
160160
<abbr>output</abbr> `bar` have changed. Likewise for `foo.dvc`, the dependency
161161
`foo` has changed, but no output has changed.
162162

163+
## Example: Specific targets
164+
165+
`dvc status` supports granularity for files found in tracked directories, for
166+
example:
167+
168+
```dvc
169+
$ tree data
170+
data
171+
β”œβ”€β”€ raw
172+
β”‚ β”œβ”€β”€ partition.1.dat
173+
β”‚ β”œβ”€β”€ ...
174+
β”‚ └── partition.n.dat
175+
└── raw.dvc # data/raw/ is tracked as a whole.
176+
177+
$ dvc status -r local data/raw/partition.1.dat
178+
new: data/raw
179+
```
180+
163181
## Example: Dependencies
164182

165183
```dvc
@@ -202,22 +220,6 @@ new: data/matrix-test.p
202220
The output shows where the location of the remote storage is, as well as any
203221
differences between the <abbr>cache</abbr> and `storage` remote.
204222

205-
Note that `dvc status` supports granularity for files found in tracked
206-
directories, for example:
207-
208-
```dvc
209-
$ tree data
210-
data
211-
β”œβ”€β”€ raw
212-
β”‚ β”œβ”€β”€ partition.1.dat
213-
β”‚ β”œβ”€β”€ ...
214-
β”‚ └── partition.n.dat
215-
└── raw.dvc # data/raw/ is tracked as a whole.
216-
217-
$ dvc status -r local data/raw/partition.1.dat
218-
new: data/raw
219-
```
220-
221223
## Example: Import stage needs update
222224

223225
Let's import a data file (`data.csv`) from a different <abbr>DVC repository

0 commit comments

Comments
Β (0)