google-cloud-platformgoogle-source-repositories

Google source repository integration


I have a git repository with multiple branches which I wanted to push to google source repository. But it takes only a particular branch of the repository. How can I create a branch on google source repository and push code to that branch only ?


Solution

  • create a new branch:

    git checkout -b branch_name
    

    edit, add and commit your files.

    then push the branch to the remote:

    git push -u origin branch_name
    

    assuming you have already added it as remote.

    see git checkout & git push.