Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How does one reference a tag number in a .gitmodule file?

Ultimately, I am wanting to point a submodule in my .gitmodule to a specific tag on the repository that houses the submodule. I know you can't outright specify a "tag" attribute or list the tag in the "branch" attribute. Is there a workaround to do something like this?

In my testing, I am currently experiencing issues with testing if the url path to the tag from the source repo can be used in the "URL" attribute. In attempts to follow the steps found in this answer:, when running 'git submodule status' I receive the error that "no submodule mapping found in .gitmodules for path 'path/name'". When running 'git rm --cached old/path', I receive the error "fatal: pathspec 'old/path' did not match any files, although I have only used one path name for this submodule. Since that didn't seem to work, the step to update submodules once again, of course, fails still, stating that there is no url found for the "old/path" even though it claims the path name cannot be found in the pathspec, it is as if it is still referencing the path name.

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 04, 2023

Hi @boonehm and welcome to the community!

I don't think that a url in .gitmodules set to something like is going to work. This is not a valid url for cloning a submodule.

A tag is always associated with a specific commit. A branch is a pointer to a commit.
You can create a new branch out of the commit that the tag is pointing to with:


and then use that's branch's name in the "branch" attribute in .gitmodules.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events