Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating multiple repositores simultaneously

Aleg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 30, 2021

Hi,

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?

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 31, 2021

Hi @Aleg,

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.

Kind regards,
Theodora

Aleg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 31, 2021

Hi Theodora,

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.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 5, 2022

Hi @Aleg,

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:

Kind regards,
Theodora

Like Aleg likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events