Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
# The Try-it has no network, so a local folder "library" plays the part # of https://github.com/example/library.git. Git only allows submodules # from local folders when protocol.file.allow is set: git config --global protocol.file.allow always # Set up the library repository git init -q library cd library echo "function hello() {}" > library.js git add library.js git commit -q -m "First version of the library" cd .. # Set up the project repository git init -q project cd project echo "
Hello World!
" > index.html git add index.html git commit -q -m "First commit" # Add the library as a submodule and commit it git submodule add ../library libs/library > /dev/null 2>&1 git commit -q -m "Add the library as a submodule" git submodule foreach git status
Entering 'libs/library'
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean