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

Can I have one repository for several different local position

Antoine Britte June 21, 2016

Hello,

On Bitbucket I have multiple repositories, one of them is a general one (like a library)

I have multiple projects that are using this same repository. For the moment each project have different sourcetree repository linked to the same repository on Bitbucket and I would like to know if it's possible to make only one sourcetree repository for multiple different location on my computer

For example :

I have 3 projects call them A, B & C
On Bitbucket I have 5 repositories call them (AA, BB, CC, DD, General)

What I have is

Project A need AA, BB & General
Project B need CC & General
Project C need DD & General 

 

I would like to know if in sourcetree I can make only 1 repository that is linked to the 3 projects in 3 different places or if only can use one location and I have to make 3 sourcetree repositories for each projects

Thanks for your answers.

2 answers

0 votes
thinsoldier
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.
June 22, 2016

I prefer submodules since they behave a bit more like SVN externals. Managing them would not be unified/embedded with the history each of your individual project repositories.

0 votes
Seth
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.
June 22, 2016

I don't know much about it, but git subtrees may be what you're looking for. 

https://medium.com/@porteneuve/mastering-git-subtrees-943d29a798ec#.tnycb0h3o

You would still have multiple copies of the General code on your machine, but managing them would be unified with whatever repository they are embedded in.

 

For a non-git, non-sourcetree answer, you can probably just use symbolic links:

https://gigaom.com/2011/04/27/how-to-create-and-use-symlinks-on-a-mac/

http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events