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?
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ben Stuart: 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.