I am working on a project that needs to only have the latest from a remote repo, we then make customized branches from that repo for our specific needs. We do not want to push any updates to the original repo.
I have been able to do this with Gitlab using there repo mirroring feature. I assumed SmartMirror features in Bitbucket Cloud Premium would do this, but I cannot see information on this use-case.
Hello @Travis Travelstead,
Unfortunately, there's no feature of mirroring repositories hosted externally. Smart Mirroring is about mirroring repositories hosted on Bitbucket Server or Cloud, useful for remote locations with limited internet connection and/or huge repositories.
There might be third party solutions for this, but I'm not aware of any.
project that needs to only have the latest from a remote repo, we then make customized branches from that repo for our specific needs. We do not want to push any updates to the original repo.
Doesn't this mean you can clone remote repository once and then work on that copy?
Thanks for the response.
We are working on a release system, so that we branch from a commit/release of the external repo. But we also want to keep getting the latest so that we can work on with new features and the next release.
We are currently cloning and then working from that clone, but we want to stay connected in one direction to pull and never push.
This is also helpful because it allows us to setup CI in one location, and build both old and new version in a single place with minimal new work.
Ok, I see what you mean, thanks.
Well, this unfortunately requires manual fetching from upstream and updating your Bitbucket copy. That said, there's no way to fork/mirror repositories outside of Bitbucket automatically.
What I can think of as a work around is configure a scheduled Pipeline that would do exactly that manual work: fetch from your external repo and then push to the Bitbucket copy. A more sophisticated solution would be to listen to webhooks from the external repository, if they are available, and fetch and push based on that.
Hope this helps. Let me know if you have any questions.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
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