Back to Developer Roadmap

Adding / Updating

src/data/roadmaps/git-github/content/[email protected]

4.0757 B
Original Source

Adding / Updating

To add a submodule to a repository, use git submodule add https://github.com/user/submodule-repo.git, which is the typical format for specifying the URL of the submodule repository. This creates a new folder for the submodule and checks it out at the specified revision. To update an existing submodule to its latest commit, run git submodule update. If you want to pull in changes from upstream while keeping your submodule's history intact, use git submodule sync followed by git submodule update.

Visit the following resources to learn more: