The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

What's the best way to manage projects that share code

hans anderson
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!
November 19, 2012

Hi,

I have two projects that share 90% of their codebase with eachother. What is the best way to manage them on stash so that when I make changes, the shared code is updated for both projects but the code that is unique to each one stays unique?

-hans

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Colin Goudie
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 Champions.
November 19, 2012

The 'correct' way is to modularise your code.

That way the shared code goes in it's own module and can be pulled in by whatever build system you use. e.g. Maven, you declare a dependency

However, if not possible, or impractical now, you could look at using something like git sub-modules.

TAGS
AUG Leaders

Atlassian Community Events