diff --git a/README.md b/README.md index 1fae02e6b7b5b06a5a524ddf1d80654245cc5302..c07ac9477fb877790b8e51b1962addc3646c7243 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,19 @@ Traverse to generated directory cd krini ``` -Switch to submodule branches configured in `.gitmodules` (otherwise submodules point to detached head) and pull the latest changes +Switch to submodule branches configured in `.gitmodules` (otherwise submodules point to detached head) ```bash +git submodule foreach 'branch="$(git config -f ../.gitmodules submodule.$name.branch)"; git checkout $branch' +``` + +> Note: When updating the superproject including all submodules, do: + +```bash +git pull git submodule sync git submodule update -git submodule foreach 'branch="$(git config -f ../.gitmodules submodule.$name.branch)"; git checkout $branch' -git submodule foreach 'branch="$(git config -f ../.gitmodules submodule.$name.branch)"; git pull origin $branch' +git submodule foreach git pull ``` ## Running tests