Search code examples
gitazure-devopsazure-devops-server-2019

copy feature branch code into master branch of another repository


I'm looking for steps to push feature branch on repository A to master branch of repository B using command line steps on azure DevOps build pipeline. Thanks


Solution

  • apparently, in the comments. everything command is coming as single line. So, here it is again.

    here, is the git commands which fixed the ask for me.

    to clone single feature branch from Repo A

    git clone -b feature/feature-test --single-branch

    creating a new branch with name as master.

    git checkout -b master

    adding remote url of Repo B

    git remote add origin-feature

    pushing to Repo B

    git push origin-feature master