We have growing number of repositories and we sometimes need to update all of them with the same change - this wastes a lot of time. Is there a way to update multiple repositories simultaneously?
Are all these repositories fork of a certain repository and do they share common history? If so, it is possible to configure multiple push urls in your local clone of one repo, make changes in that clone and then push to multiple remote repos. I can share steps on how to do that if that's the case, please feel free to let me know.
However, if these repositories don't have common history, then trying to push to multiple repos from the clone of a single repo will give you an error.
There is a way to override this by merging these histories with the flag --allow-unrelated-histories, but this means that you would merge and eventually push to all repos the history of all others, and I wouldn't recommend that.
Im not talking about a single repository to multiple repositories push or forks.
For example, if I have 10 completely different repositories, each repository represents a different service from different dev team. I decided that I want to add a script / install node package (using npm) / edit file common to all repositories / etc`... to all of the 10 repositories.
Options I have are:
Clone, create a new branch, do the changes, push, PR * #X repositors
Obviously it does not scale and before we try to solve it in-house, I wanted to see how others are handling it or if atlassian got any solution because I have not found any from atlassian.
Thanks for providing more info and explaining your use case.
The only way I can think of to automate this would be by scripting it, so create a script that:
Every time you want to make such a change, you could change the repositories that this would run for, and also the change that would be applied to these repos.
I found that there is a tool (not developed by Atlassian) that works with that logic:
But I'm afraid that it doesn't support Bitbucket Cloud yet. There is an open request to add support for Bitbucket Cloud: