0

Is it possible to make automatic synchronization of repositories, for example through pipline? I have 5 repositories Azure DevOps Which should be exactly the same as in Bitbucket (work in Bitbucket)

1 Answer 1

0

Auto copy in azure repo from bitbucket repo

Yes, we could use the Azure pipeline to sync Azure devops git repo with bitbucket repo.

Add a powershell task to execute the git command line to sync the changes:

git remote add bitbucket https://Username:[email protected]/xxx/xxxx.git HEAD:master git checkout $branch git push bitbucket $branch -f 

Besides, we could also enable the continuous integration for the pipeline, so that there is any changes in the Azure repo, it will synchronizes the changes to the bitbucket repo.

Please check this thread and this thread for some more details.

Sign up to request clarification or add additional context in comments.

4 Comments

thank you very much, I will study all info. There is a problem that these repositories already have azure.yml and some use Linux, it's not clear how to make another pipeline and use powershell
oh. i can use one new pipline (and new repo) to sync all 5 repo?
@Сергейtoff, Yes, you could so that. Just create a new folder and use git clone command line to clone all 5repo one by one, then sync it to the bitbucket repo.
Are it way is bad? stackoverflow.com/questions/57908569/… Rest post for auto import?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.