brewly — Ch.10 · Add a shared library
Exercise 4 of 6
Before you start
Submodules
A submodule puts another repository in a folder of yours. Your project does not copy its files: it records which commit of that repository to use, and lists its address in a file called .gitmodules.
Adding one
Adding a submodule downloads it and stages two things: .gitmodules and the folder, which stands for one commit. Commit them like any other change.
- git submodule add <url> <folder>
- add a repository as a submodule
- git status
- see what was staged
- git submodule status
- which commit each submodule is on
- git commit -m "What you added"
- record it
- git push
- share it
You can reopen this any time with “Lesson”.
# BrewlyOrder coffee ahead.## Team- Maya (lead)- Alex (frontend)
Graph
- 1354d06 Add menu pageHEAD → mainorigin/main
- 619eb3b Style the order button
- 5fc44ac Initial commit