Tower Help & Support

Checking Out a Revision

The reason why you add a Submodule to your project is simple: you want to add code from another repository into your project. Which code exactly arrives in your main project is determined by which revision is checked out in the Submodule.

Check Out a Branch or Tag in a Submodule

If the revision you want to have is marked by a tag or branch, you can simply right-click the Submodule in the sidebar and select it from the Check Out Revision submenu.

Check Out a Specific Revision

If the revision you want to have is a specific commit (that is marked by neither a tag nor a branch tip), you need to do this from inside the Submodule:

  • Open the Submodule by double-clicking it in the sidebar (you'll notice that Tower's Navigation Bar is prolonged by the Submodule item)
  • In the Submodule, select either the History item or any branch or tag in the sidebar
  • right-click the commit in question and choose Check Out <hash>
  • navigate back to the main project by clicking it in the Navigation Bar

Commit the Checkout

In the main repository, changing the checked out revision will be marked in the Working Copy view:

You need to stage and commit this change to make sure this revision is being used in your project.

Make sure the checked out commit is available
When checking out a different commit in a Submodule, you should also make sure that this commit is available for others. More specifically: make sure it's pushed to the common remote so that it's there when one of your teammates updates his Submodule with your moved pointer.