---
title: "Comment by Sundaram Srivastava on \"Developing on GCP 💻 - Managing Source Codes with Cloud Source Repositories  📁\" | Hashnode"
description: "Hi, Can you please explain how can I merge the code in cloud source repository. suppose I have created 2 repository :- A &amp; B. A belongs to project DEV &amp;"
url: "https://hashnode.com/posts/developing-on-gcp-managing-source-codes-with-cloud-source-repositories/5d17a441f96a9fd53220261f/comment/5e70076abc8844135ba4c915"
---

[Discussion](https://hashnode.com/posts/developing-on-gcp-managing-source-codes-with-cloud-source-repositories/5d17a441f96a9fd53220261f)

Comment [Developing on GCP 💻 - Managing Source Codes with Cloud Source Repositories 📁](https://hashnode.com/posts/developing-on-gcp-managing-source-codes-with-cloud-source-repositories/5d17a441f96a9fd53220261f)

[Sundaram Srivastava](https://hashnode.com/@sundaram)

[Mar 16, 2020](https://hashnode.com/posts/developing-on-gcp-managing-source-codes-with-cloud-source-repositories/5d17a441f96a9fd53220261f/comment/5e70076abc8844135ba4c915)

Hi, Can you please explain how can I merge the code in cloud source repository. suppose I have created 2 repository :- A & B. A belongs to project DEV & B belongs to project PROD. Now I want to merge the code from repo-A to repo-B. How can I do it, like in GITHUB we have option of merge request for 2 branches. Also how can I ensure that as soon as code gets merged to repo-B, the cloudbuild gets triggered & it deploys the code to app engine of PROD.

[Timothy Olaleke](https://hashnode.com/@timtech4u)

[May 2, 2020](https://hashnode.com/posts/developing-on-gcp-managing-source-codes-with-cloud-source-repositories/5d17a441f96a9fd53220261f/comment/5e70076abc8844135ba4c915#reply-5ead484926e78ca711dfbfd9)

Hi [Sundaram Srivastava](https://hashnode.com/@sundaram) , I'm just seeing this. The way I do this is to use Cloud Build to trigger the codes copying to another repository, ensure that your Cloud Build service account has permission to the other repo. This is my config file:

```
steps:
  - name: gcr.io/cloud-builders/git
    args: ['init']
  - name: gcr.io/cloud-builders/git
    args: ['add', '-A']
  - name: gcr.io/cloud-builders/git
    args: ['config', '--global', 'user.name', '${_GIT_NAME}']
  - name: gcr.io/cloud-builders/git
    args: ['config', '--global', 'user.email', '${_GIT_EMAIL}']
  - name: gcr.io/cloud-builders/git
    args: ['commit', '-am', 'latest production commit']
  - name: gcr.io/cloud-builders/git
    args: ['push', '-f', 'source.developers.google.com/p/$%7B_PROD_PROJECT%…', 'master']
```
