1datalad update(1)           General Commands Manual          datalad update(1)
2
3
4

NAME

6       datalad update - update a dataset from a sibling.
7

SYNOPSIS

9       datalad   update   [-h]   [-s   SIBLING]   [--merge  [ALLOWED]]  [--how
10              [{fetch|merge|ff-only|reset|checkout}]]             [--how-subds
11              [{fetch|merge|ff-only|reset|checkout}]]                [--follow
12              {sibling|parentds|parentds-lazy}] [-d DATASET] [-r] [-R  LEVELS]
13              [--fetch-all] [--reobtain-data] [--version] [PATH ...]
14
15
16

DESCRIPTION

18   Examples
19       Update from a particular sibling::
20
21        % datalad update -s <siblingname>
22
23       Update  from  a particular sibling and merge the changes from a config‐
24       ured or matching branch from the sibling (see --follow for details)::
25
26        % datalad update --how=merge -s <siblingname>
27
28       Update from the sibling 'origin', traversing into subdatasets. For sub‐
29       datasets,  merge the revision registered in the parent dataset into the
30       current branch::
31
32        % datalad update -s origin --how=merge --follow=parentds -r
33
34       Fetch and merge the remote tracking branch into  the  current  dataset.
35       Then  update each subdataset by resetting its current branch to the re‐
36       vision registered in the parent dataset, fetching only if the  revision
37       isn't already present::
38
39        %  datalad  update --how=merge --how-subds=reset--follow=parentds-lazy
40       -r
41
42

OPTIONS

44       PATH   constrain to-be-updated subdatasets to the given path for recur‐
45              sive  operation.  Constraints:  value  must be a string or value
46              must be NONE
47
48
49       -h, --help, --help-np
50              show this help message. --help-np forcefully disables the use of
51              a pager for displaying the help message
52
53       -s SIBLING, --sibling SIBLING
54              name  of  the  sibling to update from. When unspecified, updates
55              from all siblings are fetched. If there is more than one sibling
56              and  changes will be brought into the working tree (as requested
57              via --merge, --how, or --how-subds), a sibling  will  be  chosen
58              based  on  the  configured  remote  for the current branch. Con‐
59              straints: value must be a string or value must be NONE
60
61       --merge [ALLOWED]
62              merge obtained changes from the sibling. This is a subset of the
63              functionality  that can be achieved via the newer --how. --merge
64              or --merge=any is equivalent to --how=merge. --merge=ff-only  is
65              equivalent to --how=ff-only. Constraints: value must be convert‐
66              ible to type bool or value must be  one  of  ('any',  'ff-only')
67              [Default: False]
68
69       --how [{fetch|merge|ff-only|reset|checkout}]
70              how  to update the dataset. The default ("fetch") simply fetches
71              the changes from the sibling but doesn't incorporate  them  into
72              the  working  tree.  A  value  of "merge" or "ff-only" merges in
73              changes, with the latter restricting the allowed merges to fast-
74              forwards.  "reset"  incorporates  the  changes  with  'git reset
75              --hard <target>', staying on the current branch  but  discarding
76              any  changes  that aren't shared with the target. "checkout", on
77              the other hand, runs 'git checkout <target>', switching from the
78              current  branch  to a detached state. When --recursive is speci‐
79              fied, this action will also apply to subdatasets unless overrid‐
80              den  by --how-subds. Constraints: value must be one of ('fetch',
81              'merge', 'ff-only', 'reset', 'checkout')
82
83       --how-subds [{fetch|merge|ff-only|reset|checkout}]
84              Override the behavior of --how in subdatasets. Constraints: val‐
85              ue must be one of ('fetch', 'merge', 'ff-only', 'reset', 'check‐
86              out')
87
88       --follow {sibling|parentds|parentds-lazy}
89              source of updates for subdatasets.  For  'sibling',  the  update
90              will  be  done by merging in a branch from the (specified or in‐
91              ferred) sibling. The branch brought in will either be  the  cur‐
92              rent  branch's  configured branch, if it points to a branch that
93              belongs to the sibling, or a sibling branch  with  a  name  that
94              matches  the current branch. For 'parentds', the revision regis‐
95              tered in the parent dataset of  the  subdataset  is  merged  in.
96              'parentds-lazy' is like 'parentds', but prevents fetching from a
97              subdataset's sibling if the registered revision  is  present  in
98              the  subdataset. Note that the current dataset is always updated
99              according to 'sibling'. This option has no effect unless a merge
100              is  requested  and  --recursive is specified. Constraints: value
101              must be one of  ('sibling',  'parentds',  'parentds-lazy')  [De‐
102              fault: 'sibling']
103
104       -d DATASET, --dataset DATASET
105              specify  the  dataset  to update. If no dataset is given, an at‐
106              tempt is made to identify the dataset based on the current work‐
107              ing  directory.  Constraints: Value must be a Dataset or a valid
108              identifier of a Dataset (e.g. a path) or value must be NONE
109
110       -r, --recursive
111              if set, recurse into potential subdatasets.
112
113       -R LEVELS, --recursion-limit LEVELS
114              limit recursion into subdatasets to the given number of  levels.
115              Constraints:  value  must  be convertible to type 'int' or value
116              must be NONE
117
118       --fetch-all
119              this option has no effect and will be removed in a  future  ver‐
120              sion.  When no siblings are given, an all-sibling update will be
121              performed.
122
123       --reobtain-data
124              if enabled, file content that was present before an update  will
125              be re-obtained in case a file was changed by the update.
126
127       --version
128              show the module and its version which provides the command
129

AUTHORS

131        datalad is developed by The DataLad Team and Contributors <team@datal‐
132       ad.org>.
133
134
135
136datalad update 0.19.3             2023-08-11                 datalad update(1)
Impressum