relative gitmodule references between stash projects

Robbin Bonthond
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2014

if I have 2 projects with a repository each, is it possible to make a git submodule relative reference between these 2 projects? I'm not sure how how handle the stash project name in the relative url reference.

ssh://git@stash.company.com/projectA/master.git

ssh://git@stash.company.com/projectB/submodule1.git

ssh://git@stash.company.com/projectC/submodule2.git

so I want master.git to have relative submodule references to submodule1.git submodule2.git in different projects.

3 answers

1 accepted

0 votes
Answer accepted
Robbin Bonthond
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2015

has been fixed

0 votes
Robbin Bonthond
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2014
0 votes
Robbin Bonthond
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2014

ah, you need to references 2 levels deep:

git clone ssh://git@stash.xxx.com/prja/master.git
cd master
git submodule add ../../prjb/sub1.git

that works.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2014

Hi Robbin,

Just to let you know that while that works on the command line Stash itself doesn't actually link them in the file view, that only works for absolute URLs.

Feel free to raise an improvement if you like.

Charles

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events