diff --git a/README.md b/README.md index 45fba69..768db7c 100644 --- a/README.md +++ b/README.md @@ -73,14 +73,37 @@ cd CPP_PTB matlab -nojvm -nosplash -r "addpath(fullfile(pwd))" ``` -To get the latest commit you then need to update the submodule with the information +To get the latest commit you then need to update the submodule with the information on its remote repository and then merge those locally. ```bash git submodule update --remote --merge ``` -Remember that updates to submodules need to be commited as well. +Remember that updates to submodules need to be committed as well. +#### Example for submodule usage + +So say you want to clone a repo that has some nested submodules, then you would type this to get the content of all the submodules at once (here with my experiment repo): +``` bash +git clone --recurse-submodules https://github.com/user_name/yourExperiment.git +``` +This would be the way to do it "by hand" + +```bash +# clone the repo +git clone https://github.com/user_name/yourExperiment.git + +# go into the directory +cd yourExperiment + +# initialize and get the content of the first level of submodules (CPP_PTB and CPP_BIDS) +git submodule init +git submodule update + +# get the nested submodules JSONio and BIDS-matlab for CPP_BIDS +git submodule foreach --recursive 'git submodule init' +git submodule foreach --recursive 'git submodule update' +``` **TO DO**