Direct datalad use

You can refer to the datalad handbook for a comprehensive information. Here are just very basic commands you may need/want to use.

First, you should always have your terminal/command window pointing to the parent folder: use cd ... to navigat to the main folder, (on some OS, if you right-click a folder, you can choose to open a terminal there). You may only type cd and theh drop a folder in the terminal window.

Those commands are. used in the script:

  • datalad get . -r -n : initialise submodules, run only the first time a repository is installed locally.
  • datalad save -r -m {you can add a message here !}: write all changes in the version history system locally (using the same commit message in all respositories)
  • datalad update -r --how=merge :merge new content found on the server version
  • datalad push -r: upload all saved changes on the server

  • datalad drop . -r: All files that are annexed are dropped (erased from the local computer once safe on the server). What file are annexed or not depends on the .gitattribute file.

  • datalad get . -r: download all annexed files

Notes:

  • the . indicate "everything", you can also specify a unique file to download or drop.
  • -r indicates the command will be run recursively in all submodule (also by default in submodules of submodules is there are any)
  • when running code using datalad run, data will be fetched on demand. See http://handbook.datalad.org/en/latest/basics/basics-run.html
Iamabot edited this page 1 year ago