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.
Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...
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