Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How many clones of repository are required?

We are using sourctree on RDS to connect to bitbucket.

Is it necessary to clone repository for each user or a single clone can be shared by all users?

Cloning repository/user will occupy lot of space. Can someone suggest any alternative wherein all users can access a single clone from the bitbucket?


1 answer

0 votes

Hey Sneha, I'm not sure I understand you question. Usually each user will have a  local clone of the central repository. Each user will push their changes/ branches to the central repository. Or are you talking about personal forked repositories

I would suggest you read Comparing Workflows for a detailed explanation and examples. 


@The Commodore

Hi Ben. My question is that is it possible that we maintain one common clone which is accessed by each user and each user pushes his/her change to this clone which inturn pushes to the target location.?

We are using Tortoise Git as a client for Bitbucket and once we commit changes,  Jenkins will trigger build. Our Tortoise GIT is on RDS.

Do you think with these tools , such a setup is possible?

Hey Sneha, 

I don't think this setup would be feasible or efficient for how Git was designed to be used. This sounds pretty similar to a forking model though. Check out forked repositories. You can have all your developers working on the fork and then create pull requests to the primary repository once you finish with your changes. I could be misunderstanding your use case though. Maybe you can explain more why you would like this workflow and what you're trying achieve by setting it up in this way. 


@The Commodore: Could you suggest any git clents for bitbucket that could help me achieve this(single clone for all users)?

The issue is that if each user maintains a clone of repository, that is occupying a lot of space and that is what we are trying to overcome

I'm not sure of any Git clients that could do this as it goes against the nature of Distributed Version Control Systems. If you're mostly concerned with disk space on your developer's local machines, I have a few suggestions that may help. 

If your repository is very large due to file sizes or number of branches, your developers can use the following command to clone a branch or subsection of the repository.

git clone <url> --branch <branch> --single-branch [<folder>]

If your repository is large due to a long commit history, your developers may just want to clone one or two commits with a "Shallow Clone" command like this:  

git clone --depth [depth] [remote-url]

I would recommend you read How to Handle Big Repositories with Git for more information. 

There are also ways you can reduce the size of your repository which might be helpful. You can ignore the Bitbucket Cloud related restrictions described there and focus on these sections: 

I hope that helps!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,251 views 4 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you