Skip to content

Commit

Permalink
cmd-ref: document checkout displaying changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Mar 16, 2020
1 parent 7d9d107 commit 20ec6ac
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
11 changes: 6 additions & 5 deletions public/static/docs/command-reference/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DVC-files.
## Synopsis

```usage
usage: dvc checkout [-h] [-q | -v] [-d] [-R] [-f] [--relink]
usage: dvc checkout [-h] [-q | -v] [--summary] [-d] [-R] [-f] [--relink]
[targets [targets ...]]
positional arguments:
Expand Down Expand Up @@ -58,9 +58,8 @@ restoring any file size will be almost instantaneous.
> `cache.slow_link_warning` config option to `false` with `dvc config cache`.
This command will fail to checkout files that are missing from the cache. In
such a case, `dvc checkout` prints a warning message. It also lists removed
files. Any files that can be checked out without error will be restored without
being reported individually.
such a case, `dvc checkout` prints a warning message. It also displays a list of
changes made by the `checkout`.

There are two methods to restore a file missing from the cache, depending on the
situation. In some cases a pipeline must be reproduced (using `dvc repro`) to
Expand All @@ -69,6 +68,8 @@ be pulled from remote storage using `dvc pull`.

## Options

- `--summary` - displays summary of the changes.

- `-d`, `--with-deps` - determines files to update by tracking dependencies to
the target DVC-files (stages). If no `targets` are provided, this option is
ignored. By traversing all stage dependencies, DVC searches backward from the
Expand Down Expand Up @@ -188,7 +189,7 @@ doesn't track those files; DVC does, so we must do this:
```dvc
$ dvc fetch
$ dvc checkout
# TODO @skshetry: show output here
$ md5 model.pkl
MD5 (model.pkl) = 43630cce66a2432dcecddc9dd006d0a7
```
Expand Down
1 change: 1 addition & 0 deletions public/static/docs/command-reference/fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ Let's now link files from the cache to the workspace with:

```dvc
$ dvc checkout
# TODO @skshetry: show output format here?
```

## Example: Specific stages
Expand Down
2 changes: 2 additions & 0 deletions public/static/docs/get-started/older-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Let's say we want to get the previous `model.pkl` file. The short answer is:
```dvc
$ git checkout baseline-experiment train.dvc
$ dvc checkout train.dvc
# TODO @skshetry: Show output here?
```

These two commands will bring the previous model file to its place in the
Expand Down Expand Up @@ -47,6 +48,7 @@ To fully restore the previous experiment we just run `git checkout` and
```dvc
$ git checkout baseline-experiment
$ dvc checkout
# TODO: show output here
```

Read the `dvc checkout` command reference and a dedicated data versioning
Expand Down
2 changes: 2 additions & 0 deletions public/static/docs/tutorials/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ straightforward:
```dvc
$ git checkout v1.0
$ dvc checkout
# TODO @skshetry: show output here?
```

These commands will restore the workspace to the first snapshot we made: code,
Expand All @@ -270,6 +271,7 @@ previous dataset version, we can do something like this:
```dvc
$ git checkout v1.0 data.dvc
$ dvc checkout data.dvc
# TODO @skshetry: show output here?
```

If you run `git status` you'll see that `data.dvc` is modified and currently
Expand Down

0 comments on commit 20ec6ac

Please sign in to comment.