You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 31, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: book/data_management.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -966,16 +966,19 @@ Let's say that we want to create a new dataset on our local computer that will b
966
966
967
967
```bash
968
968
➤ datalad create -d . my_datalad_repo
969
+
969
970
add(ok): my_datalad_repo (dataset)
970
971
add(ok): .gitmodules (file)
971
972
save(ok): . (dataset)
972
973
create(ok): my_datalad_repo (dataset)
974
+
973
975
```
974
976
975
977
This creates a new directory, called `my_datalad_repo` and sets it up as a DataLad subdataset within our main git repo. We then download some data files from another project using the `datalad download-url` function, which will both download the data and save them into the datalad dataset:
@@ -1040,19 +1046,19 @@ We can now use `datalad status` to see that the file has been modified:
1040
1046
1041
1047
```bash
1042
1048
➤ datalad status
1043
-
modified: book/data_management.md (file)
1049
+
1044
1050
modified: my_datalad_repo (dataset)
1045
1051
```
1046
1052
1047
1053
And we can then save it using `datalad save`:
1048
1054
```bash
1049
-
➤ datalad save -m "removed Motivation variables from demographics.csv"
1055
+
➤ datalad save -d . -m "Modified demographics.csv" my_datalad_repo/data/demographics.csv
1050
1056
1051
1057
add(ok): data/demographics.csv (file)
1058
+
save(ok): my_datalad_repo (dataset)
1059
+
add(ok): my_datalad_repo (dataset)
1060
+
add(ok): .gitmodules (file)
1052
1061
save(ok): . (dataset)
1053
-
action summary:
1054
-
add (ok: 1)
1055
-
save (ok: 1)
1056
1062
```
1057
1063
1058
1064
DataLad doesn't have a staging area like `git` does, so there is no need to first add and then commit the file; `datalad save` is equivalent to adding and then committing the changes. If we then check the status we see that there are no changes waiting to be saved:
0 commit comments