Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import: add '--file' option #1816

Merged
merged 2 commits into from
Sep 27, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion content/docs/command-reference/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ the import.
## Synopsis

```usage
usage: dvc import [-h] [-q | -v] [-o <path>] [--rev <commit>] url path
usage: dvc import [-h] [-q | -v] [-o <path>] [--file <filename>] [--rev <commit>] url path

positional arguments:
url Location of DVC or Git repository to download from
Expand Down Expand Up @@ -86,6 +86,11 @@ repo at `url`) are not supported.
current working directory). Directories specified in the path must already
exist, otherwise this command will fail.

- `--file <filename>` - specify a path and/or file name for the `.dvc` file
created by this command (e.g. `--file stages/stage.dvc`). This overrides the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to avoid using stage in the import context (for the future cc @jorgeorpinel )

Copy link
Contributor

@jorgeorpinel jorgeorpinel Oct 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. We have a pending check box about this in the #608 epic. Also rel=#1366

default file name: `<file>.dvc`, where `<file>` is the desired file name of
the imported data (`out`).

- `--rev <commit>` - commit hash, branch or tag name, etc. (any
[Git revision](https://git-scm.com/docs/revisions)) of the repository to
download the file or directory from. The latest commit in `master` (tip of the
Expand Down