table of contents
datalad add(1) | General Commands Manual | datalad add(1) |
NAME¶
datalad add - add files/directories to an existing dataset.
SYNOPSIS¶
datalad add [-h] [-d PATH] [--to-git] [--nosave] [-m MESSAGE] [-F MESSAGE_FILE] [-r] [-R LEVELS] [-S] [--git-opts STRING] [--annex-opts STRING] [--annex-add-opts STRING] [-J NJOBS] PATH [PATH ...]
DESCRIPTION¶
*Note*: This is an obsolete interface. Use datalad.api.save or
Dataset.save
instead.
Typically, files and directories to be added to a dataset would be placed into a directory of a dataset, and subsequently this command can be used to register this new content with the dataset. With recursion enabled, files will be added to their respective subdatasets as well.
By default all files are added to the dataset's annex, i.e. only their content identity and availability information is tracked with Git. This results in lightweight datasets. If desired, the --to-git flag can be used to tell datalad to inject files directly into Git. While this is not recommended for binary data or large files, it can be used for source code and meta-data to be able to benefit from Git's track and merge capabilities. Files checked directly into Git are always and unconditionally available immediately after installation of a dataset.
- NOTE
- Power-user info: This command uses git annex add or git add to incorporate new dataset content.
OPTIONS¶
- PATH
- path/name of the component to be added. The component must exist on the filesystem already. Constraints: value must be a string
- -h, -\-help, -\-help-np
- show this help message. --help-np forcefully disables the use of a pager for displaying the help message
- -d PATH, -\-dataset PATH
- specify the dataset to perform the add operation on. If no dataset is given, an attempt is made to identify the dataset based on the current working directory and/or the PATH given. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path)
- -\-to-git
- flag whether to add data directly to Git, instead of tracking data identity only. Usually this is not desired, as it inflates dataset sizes and impacts flexibility of data transport. If not specified - it will be up to git-annex to decide, possibly on .gitattributes options.
- -\-nosave
- by default all modifications to a dataset are immediately saved. Giving this option will disable this behavior.
- -m MESSAGE, -\-message MESSAGE
- a description of the state or the changes made to a dataset. Constraints: value must be a string
- -F MESSAGE_FILE, -\-message-file MESSAGE_FILE
- take the commit message from this file. This flag is mutually exclusive with -m. Constraints: value must be a string
- -r, -\-recursive
- if set, recurse into potential subdataset.
- -R LEVELS, -\-recursion-limit LEVELS
- limit recursion into subdataset to the given number of levels. Constraints: value must be convertible to type 'int'
- -S, -\-ds2super, -\-datasets-to-super
- given paths of dataset (toplevel) locations will cause these datasets to be added to their respective superdatasets underneath a given base DATASET (instead of all their content to themselves). If no base DATASET is provided, this flag has no effect. Regular files and directories are always added to their respective datasets, regardless of this setting.
- -\-git-opts STRING
- option string to be passed to git calls. Constraints: value must be a string
- -\-annex-opts STRING
- option string to be passed to git annex calls. Constraints: value must be a string
- -\-annex-add-opts STRING
- option string to be passed to git annex add calls. Constraints: value must be a string
- -J NJOBS, -\-jobs NJOBS
- how many parallel jobs (where possible) to use. "auto" corresponds to the number defined by 'datalad.runtime.max-annex-jobs' configuration item. Constraints: value must be convertible to type 'int', or value must be one of ('auto',)
AUTHORS¶
datalad is developed by The DataLad Team and Contributors <team@datalad.org>.
2020-04-24 | datalad add 0.12.6 |