This repo collects all of CFL's repos. Furthermore, this repo supports the cloning of all CFL repos using a single command. This is achieved using Git Submodules, which is supported by GitHub.
To setup your workspace, you'll need to recursively clone all repos in CFL's workspace:
git clone --recurse-submodules https://github.com/ocadotechnology/codeforlife-workspace.git
Next, open CFL's workspace in VSCode: VSCode > File > Open Workspace from File... > path/to/codeforlife-workspace/codeforlife.code-workspace
.
To add a new submodule to CFL's workspace:
-
Clone the workspace and
cd
into it. -
Add the submodule to the workspace:
git submodule add {CFL_REPO_URL_HERE}
-
Add the new folder to CFL's code-workspace.
-
Git commit and push the changes.
To sync your local submodules with the submodules in CFL's remote workspace:
git submodule update --remote
(NOTE: this will clone new submodules added by someone else)
To remove an existing submodule from CFL's workspace:
-
Clone the workspace and
cd
into it. -
De-initialize the submodule:
git submodule deinit -f {SUBMODULE_NAME_HERE}
-
Remove the submodule from git's list of submodules.
rm .git/modules/{SUBMODULE_NAME_HERE} -r -fo && git rm -f {SUBMODULE_NAME_HERE}
-
Git commit and push the changes.
If you have renamed a submodule, it's recommended to remove and add it again.