Git Tutorials

Instructional Training Videos

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

Make Git Easier, Safer &
More Powerful

with GitKraken