Dependency management using git submodules
summary
Demonstrates using git submodule and git subtree with live demos: commands to add, update and remove submodules (including git submodule update --remote) and to add/pull/push subtrees (including git subtree add --prefix). Shows a docs project with three subtrees where a Maven build runs successfully. Emphasizes that submodules store a specific commit hash (smaller repo size, server-accessible), while subtrees merge full commit history into the parent (larger repo, easier local editing), and recommends tool choice by whether pushing back to upstream is expected.
AI-written summary · about
chapters (10)
- 0:00Introduction and speaker intro
- 1:21Why dependency management matters
- 2:53Git submodules overview
- 5:06Git submodules demo and commands
- 8:07Git subtree overview
- 8:51Git subtree demo and commands
- 12:32Applications and use cases
- 14:05Git submodules vs subtrees comparison
- 17:27Alternatives to submodules and subtrees
- 18:58Q&A session
