Join us December 10-11, 2024
| Developer Experience + AI Conference
Register now free →
Search
Close this search box.

Git Submodule How To

Advanced Git Tutorial

GitKraken makes advanced Git actions, like working with submodules, easier for Git beginners and more intuitive for long time users.

What is a submodule in Git?

Watch this advanced Git tutorial video to learn about a Git submodule and how you can use submodules in Git to benefit your project.

A Git submodule is like a repository inside of another Git repository, or a child repository of one parent repository.

Learn how to add a Git submodule to your project and how to pull changes to your Git submodule so they are reflected in your main project by pointing to a specific commit. Plus, see an example of how to update and remove a Git submodule.

Git Submodules in GitKraken

If you’re using the GitKraken Git GUI to manage your Git submodules, you can access your submodules from the lower left corner of the app. 

If your repo already has submodules, you can click to edit the Remote URL, the Path, or view the Current Revision. You can also open your submodule’s repository inside of GitKraken, and make any additional changes. 

When you exit the submodule, GitKraken will detect the update and you can select Commit Changes to incorporate the changes into the parent repository.

If you need to create a new submodule for your existing repository, click the + icon from the submodules pane to enter the remote URL and the repo path. You will see the update to your .gitmodules file in your WIP node, and once you commit the changes, your submodule will be ready!

Additional Resources

Table of Contents

Make Git Easier, Safer &
More Powerful

with GitKraken

Visual Studio Code is required to install GitLens.

Don’t have Visual Studio Code? Get it now.

Team Collaboration Services

Secure cloud-backed services that span across all products in the DevEx platform to keep your workflows connected across projects, repos, and team members
Launchpad – All your PRs, issues, & tasks in one spot to kick off a focused, unblocked day. Code Suggest – Real code suggestions anywhere in your project, as simple as in Google Docs. Cloud Patches – Speed up PR reviews by enabling early collaboration on work-in-progress. Workspaces – Group & sync repos to simplify multi-repo actions, & get new devs coding faster. DORA Insights – Data-driven code insights to track & improve development velocity. Security & Admin – Easily set up SSO, manage access, & streamline IdP integrations.
winget install gitkraken.cli