What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Git submodules do not track a tag through .gitmodules. To use a release tag, check out that tag inside the submodule, then commit the resulting submodule commit reference—the gitlink—in the parent repository. That pins a specific commit for collaborators. If you want updates from a moving upstream branch instead, configure branch tracking and use git submodule update --remote.
What “tracking a tag” means for a submodule
A submodule has two related but distinct pieces of state: the submodule repository’s own checkout, and the commit that the superproject records for that submodule path. The superproject records a gitlink to a specific commit. That commit—not a tag name or a branch name—is the dependency pin that collaborators receive.
As an Amazon Associate I earn from qualifying purchases.
The submodule.<name>.branch setting in .gitmodules names a remote branch for tracking updates. It is not a documented tag-following setting. Likewise, git submodule update --remote updates from a remote-tracking branch; ordinary git submodule update checks out the commit recorded by the superproject. See the Git documentation for .gitmodules, git submodule, and gitlinks.
How to pin a submodule to a release tag
-
Initialize the submodule if it has not been initialized, then fetch its tags:
#1 Best Overall
git submodule update --init path/to/submodule git -C path/to/submodule fetch --tags -
Check out the desired tag in the submodule. A detached checkout is normal here:
git -C path/to/submodule checkout --detach v1.2.3 -
From the superproject, stage the submodule path and commit the updated gitlink:
Rank #2
git add path/to/submodule git commit -m "Pin submodule to v1.2.3" -
Have collaborators update their checkout from the superproject’s recorded commit:
Recommended: PC Feels Slow? A Free Scan Shows What's Dragging Windows Down →Recommended: Crashes or Glitches? A Free Driver Scan Usually Finds the Culprit →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.git submodule update --init --recursive
The tag is a convenient way for you to select the release commit. The committed gitlink records the selected commit ID, so collaborators do not need to resolve the tag themselves.
When to use a tag-selected commit or a branch
| Approach | How it updates | Best suited to |
|---|---|---|
| Choose a commit through a tag, then commit the gitlink | The superproject stays pinned to the selected commit until you change and commit the gitlink. | Repeatable builds, deliberate release upgrades, and review before adopting a dependency change. |
Track a remote branch with submodule.<name>.branch and run git submodule update --remote |
The submodule can move to a newer commit as the remote branch advances; commit the resulting gitlink change in the superproject to record the update. | Intentionally adopting ongoing upstream branch changes. |
For branch tracking, set submodule.<name>.branch to the remote branch name in .gitmodules. The exact submodule name is the section name used by that file; it may differ from the path. The Git documentation defines this setting as “A remote branch name for tracking updates in the upstream submodule.”
What happens if the tag moves or disappears?
The superproject still records the commit ID it selected, even if the tag is later moved or deleted. But reproducibility also depends on being able to obtain that commit: the submodule remote must continue to retain and serve it. A tag helps identify the intended release for maintainers; it does not replace the commit reference stored in the superproject.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What collaborators should run
After the superproject change is committed and shared, collaborators can run git submodule update --init --recursive to initialize and check out the recorded commits, including nested submodules. For one submodule, use a path-specific form such as git submodule update --init path/to/submodule. Git checks out the recorded commit in the submodule on a detached HEAD; that is expected. To make a different tag-selected release the project’s dependency, the maintainer must update the submodule checkout and commit the changed gitlink in the superproject.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsQuick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




