alexandrus91/example-submodule — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a very small JavaScript demo repo that teaches Git submodules in the simplest possible way. I want it to be useful for a beginner who is learning how a main project can point to another repository at a specific commit.

Keep the actual app tiny, just a single app.js that can be changed across a few commits and is easy to understand. Add a short README that explains that this is an example project for practicing submodules, especially adding the githubtraining example dependency as a submodule, looking at how the parent repo tracks the submodule by commit reference, and changing that reference by checking out a different commit inside the submodule folder.

Please keep it simple and focused. No big framework, no extra tooling, no complicated setup. The goal is for someone to clone it, read it, run the JavaScript file if needed, and use it while following a Git submodule lesson.

Want more depth? Deep Reverse