101-125-summary.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .. _summary_config:
  2. Summary
  3. -------
  4. This has been a substantial amount of information regarding various configuration
  5. types, methods, and files. After this lecture, you have greatly broadened
  6. your horizon about configurations of datasets:
  7. - Configurations exist at different scopes and for different tools. Each
  8. of such configuration scopes exists in an individual file, on a *system-wide*,
  9. *global* (user-specific) or *local* (repository specific) level. In addition
  10. to Git's *local* scope in ``.git/config``, DataLad introduces its own configurations within
  11. ``.datalad/config`` that apply to a specific dataset, but are committed and
  12. therefore distributed. More specialized scopes take precedence over more global scopes.
  13. - Almost all configurations can be set with the :gitcmd:`config` command.
  14. Its structure looks like this:
  15. .. code-block:: bash
  16. git config --local/--global/--system --add/remove-all/--list section.[subsection.]variable "value"
  17. - The ``.git/config`` configuration file is not version controlled, other
  18. configuration files (``.gitmodules``, ``.gitattributes``, ``.datalad/config``)
  19. however are, and can be shared together with the dataset. Non-shared configurations
  20. will take precedence over shared configurations in a dataset clone.
  21. - Other tools than Git can be configured with the :gitcmd:`config` command
  22. as well. If configurations needs to be written to a file other than a
  23. ``.git(/)config`` file, supply a path to this file with the ``-f/--file`` flag
  24. in a :gitcmd:`config` command.
  25. - The ``.gitattributes`` file is the only configuration file the :gitcmd:`config`
  26. command cannot write to, because it has a different layout. However, run-procedures or
  27. the user can write simple rules into it that determine which files are annexed
  28. and which are stored in Git.
  29. - DataLad's ``run-procedure``\s offer an easy and fast alternative to DIY
  30. configurations, structuring, or processing of the dataset, and offer means to share or ship configurations together with a dataset.
  31. They can be applied already at creation of a dataset with ``datalad create -c <procedure>``,
  32. or executed later with a :dlcmd:`run-procedure` command.
  33. Now what can I do with it?
  34. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  35. Configurations are not a closed book for you anymore. What will probably be
  36. especially helpful is your new knowledge about ``.gitattributes`` and
  37. DataLad's ``run-procedure`` command that allow you to configure the behavior
  38. of git-annex in your dataset.