-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd ref: improve last paragraph of re-importing example in import
- Loading branch information
1 parent
b848aa8
commit 2cb3aaa
Showing
1 changed file
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,22 +148,28 @@ deps: | |
rev_lock: 0547f5883fb18e523e35578e2f0d19648c8f2d5c | ||
``` | ||
|
||
If the Git revision tends to move, i.e. branches, this doesn't have much of an | ||
effect on the import/update workflow. However, for typically static references | ||
i.e. tags, or for SHA commits, `dvc update` will not have any effect on the | ||
import. In this cases, in order to actually "update" an import, it's necessary | ||
to **re-import the data** instead, by using `dvc import` again without or with a | ||
different `--rev`. For example: | ||
If the | ||
[Git revision](https://git-scm.com/book/en/v2/Git-Internals-Git-References) | ||
tends to move, i.e. branches, this doesn't have much of an effect on the | ||
import/update workflow. However, for typically static references i.e. tags, or | ||
for SHA commits, `dvc update` will not have any effect on the import. | ||
|
||
In this cases, in order to actually "update" an import, it's necessary to | ||
**re-import the data** instead, by using `dvc import` again without or with a | ||
different `--rev`. This will overwrite the import stage (DVC-file), either | ||
removing or replacing the `rev` field, respectively. This can produce an import | ||
stage that is able to be updated normally with `dvc update` going forward. For | ||
example: | ||
|
||
```dvc | ||
$ dvc import --rev master \ | ||
[email protected]:iterative/dataset-registry.git \ | ||
use-cases/cats-dogs | ||
``` | ||
|
||
This will overwrite the import stage (DVC-file) either removing or replacing the | ||
`rev` field. This can produce an import stage that is able to be updated | ||
normally with `dvc update` going forward. | ||
> In the above example, the value for `rev` in the new import stage will be | ||
> `master`, which happens to be the default branch in this Git repository, so | ||
> the command is equivalent to not using `--rev` at all. | ||
|
||
## Example: Data registry | ||
|
||
|