Single repository vs multiple


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.



1 answer

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 (

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:

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>]


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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

679 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you