Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure a submodule to point to a specific tag/commit

Dimitri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2021

Hi,

Let's say we have two repositories Main and Common, Common has been added as a submodule of Main. Commits of Common get tagged on master when Common is in a state it can be used by Main. Common might be developed ahead of Master such that when Main integrates Common, it is not interested in the head of Common on master but in an older commit that has been tagged.

I'm new to git and used to Allchange or PTC integrity version controls solutions where I'm used to this functionality.

How would you go about doing this in git/bitbucket? I can't find a simple command to do this and a work around I am considering is creating a branch of Common instead of a tag and point Main to that branch.

Note that I'm using Bitbucket v5.11.1

Regards,

Dimitri

1 answer

0 votes
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
June 21, 2021

If it is an option I suggest to create a versioned library or some sort of versioned artefact out of common that is consumed by Main. Main can choose which version of Common it needs. This way Main and Common can be maintained independently.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events