Skip to content

Submodule Upgrades using TortoiseGit

slodki edited this page Apr 30, 2018 · 2 revisions

What is TortoiseGit

TortoiseGit provides a GUI extension for Git, within Windows, and installs itself within the Windows File Explorer. This allows Windows File Explorer to access a Git repository. TortoiseGit commands are accessed using the file explorer's popup window.

TortoiseGit Revision Graph

This provides a graphical view of a GIT repository. This view is of particular importance when multiple repositories for the same project are viewed, because it shows the relationship between the various branches from various developers.

All connected branches are shown in a PALE BROWN colour. All tags are in YELLOW. The working repository (where the actual files can be seen on the local machine) will be highlighted in RED. Switching branches in the repository creates active non working branches. These branches are represented in GREEN.

Using the Revision Graph, TortoiseGit allows quick branch switching between active working and nonworking branches.

Upgrading a Sub-module

  1. Locate the sub-module folder within your project.
  2. Use TortoiseGit to display a Revision Graph of the sub-module.
  3. Locate the master branch highlighted in either Red or Green.
  4. If the master branch is green, select and switch to this branch.
  5. The master branch should now be shown in Red on the Revision Graph.
  6. Using Git Sync on the sub-module, synchronise the master branch to the remote repository.
  7. May require a 'Submodule Sync' as well as a 'Submodule Update' command.
  8. Confirm that the master branch is in sync to the remote branch.
  9. The change of the sub-module conditions will reflect as a change to the main project.
  10. Commit the change to the main project.

Encountered Sub module Problems

This can occur where the remote branch being tracked, is reconfigured within the structure of their project. This can be resolved as follows:

  1. Using TortoiseGit Show Log on the sub-module, we can confirm we are using the master branch.
  2. Locate a known good tag or commit point on the log.
  3. Perform a Reset "master" to this as a hard reset.
  4. Using Git Sync, synchronise to the remote master branch.
  5. Confirm that the master branch is in sync to the remote branch.
  6. The change of the sub-module conditions will reflect as a change to the main project.
  7. Commit the change to the main project.