/codeforlife-workspace

Everything Code for Life related

OtherNOASSERTION

codeforlife-workspace

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.

Setup Workspace

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.

Update Workspace

Add Submodule

To add a new submodule to CFL's workspace:

  1. Clone the workspace and cd into it.

  2. Add the submodule to the workspace:

    git submodule add {CFL_REPO_URL_HERE}
  3. Add the new folder to CFL's code-workspace.

  4. Git commit and push the changes.

Update Submodules

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)

Remove Submodule

To remove an existing submodule from CFL's workspace:

  1. Clone the workspace and cd into it.

  2. De-initialize the submodule:

    git submodule deinit -f {SUBMODULE_NAME_HERE}
  3. Remove the submodule from git's list of submodules.

    rm .git/modules/{SUBMODULE_NAME_HERE} -r -fo && git rm -f {SUBMODULE_NAME_HERE} 
  4. Git commit and push the changes.

Edit Submodule

If you have renamed a submodule, it's recommended to remove and add it again.