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

Single repository vs multiple

subhajit bhadury May 19, 2017

Hi,

I have several projects stored in several folders and they are not related proejcts. Now I know that it is always best to go with single repository per repository, but I have followig question if I will put all the projects folder in a single repository,

1. Is there any probelm will happened with revision history?

2. Check out of single file/ folder is possible or I have to clon whole repository?

3. What will happened to Forking and branching?

If any other problem is there please let me know.

Thanks,

Suabhjit

1 answer

0 votes
josuetello May 19, 2017

I am not an expert but this is based on my experience with git:

1. There will only be a problem with revision history if you do not use the git commands while moving things around. i always use git mv or git rm git to help preserve file history. Here is a stackover flow posted on this (http://stackoverflow.com/questions/2314652/is-it-possible-to-move-rename-files-in-git-and-maintain-their-history)

2.  You will always have to clone the whole repository no way around it.

3. Forking and branching will work the same way it will be done with all the folders etc... in that project.

 

If you really have your heart set on staying in a single repository you could also consider  having each folder be its own branch; if you use triggers: https://community.atlassian.com/t5/Bitbucket-questions/Branch-specific-build-triggers/qaq-p/276162

in this way you could then clone the single branches and still live under the same repo: git clone <url> --branch <branch> --single-branch [<folder>]

 

subhajit bhadury May 19, 2017

Thanks a lot for the reply. 1# Can you please explain more on this with an example. I understand that if 2 projects folder are there in single repository then commit on one project also change the revision number of the other project. 2# I heard that in recent version we can clone only specific file/ folder from Bitbuket? But I am really not sure. 3# I understood.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events