2020-07-22 16:27:28 +01:00
|
|
|
# dvc add
|
|
|
|
|
|
|
|
> Adds changed files to the index.
|
|
|
|
> More information: <https://dvc.org/doc/command-reference/add>.
|
|
|
|
|
|
|
|
- Add a single target file to the index:
|
|
|
|
|
|
|
|
`dvc add {{path/to/file}}`
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
- Add a target directory to the index:
|
2020-07-22 16:27:28 +01:00
|
|
|
|
|
|
|
`dvc add {{path/to/directory}}`
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
- Recursively add all the files in a given target directory:
|
2020-07-22 16:27:28 +01:00
|
|
|
|
|
|
|
`dvc add --recursive {{path/to/directory}}`
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
- Add a target file with a custom `.dvc` filename:
|
2020-07-22 16:27:28 +01:00
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
`dvc add --file {{custom_name.dvc}} {{path/to/file}}`
|