Skip to content

Commit

Permalink
cmd ref: add more explanations to freeze
Browse files Browse the repository at this point in the history
per #1488 (review)
et al.
  • Loading branch information
jorgeorpinel committed Jun 24, 2020
1 parent b0b78ba commit ebd25a6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions content/docs/command-reference/freeze.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,22 @@ using `dvc repro` on a pipeline that needs their outputs.

## Examples

First, let's create a simple DVC-file:
First, let's create a dummy stage that copies `foo` to `bar`:

```dvc
$ echo foo > foo
$ dvc add foo
$ dvc run -d foo -o bar -n make_copy cp foo bar
$ dvc run -n make_copy -d foo -o bar cp foo bar
```

> See `dvc run` for more details.
Then, let's change the file `foo` that the stage `make_copy` depends on:

```dvc
$ rm foo
$ echo foo1 > foo
$ dvc status
make_copy:
changed deps:
modified: foo
Expand All @@ -62,23 +63,24 @@ foo.dvc:
modified: foo
```

Now, let's freeze the `make_copy` stage:
`dvc status` notices that `foo` has changed. Let's now freeze the `make_copy`
stage and see what's the project status after that:

```dvc
$ dvc freeze make_copy
$ dvc status
foo.dvc:
changed outs:
modified: foo
```

Run `dvc unfreeze` to unfreeze it back:
DVC notices that `foo` changed due to the `foo.dvc` file that tracks this file
(as `outs`), but the `make_copy` stage no longer records the change among it's
`deps`. Run `dvc unfreeze` to go back to the regular project status:

```dvc
$ dvc unfreeze make_copy
$ dvc status
make_copy:
changed deps:
modified: foo
Expand Down

0 comments on commit ebd25a6

Please sign in to comment.