Change GitHub source of app

I moved my app to a different git repo. How can I update the DO reference to this git repository and remove the old git repo connection? and test the deployment from the new repo?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
May 14, 2023

Hello @c1192def936b463dbf30a6928e695d

One way to do this would be to change your App Spec and specify the new source of your project:

You can change the source accordingly and then do a standard deployment with the new app specification.

From the API, the process is similar, you just upload the app spec using doctl apps update or use the http api.

To update the reference to a different Git repository for your App Platform app via the UI, you need to perform the following steps:

  1. Log into your DigitalOcean control panel.
  2. Navigate to the Apps section.
  3. Select your app and click on the Settings tab.
  4. Under the Deployment source, click on Change Repository.
  5. Choose the new repository from the available options or connect a different GitHub/GitLab account.
  6. Confirm the changes and click Save.

After making the changes, DigitalOcean will automatically trigger a new deployment using the new repository. Make sure the app.yaml or .do/app.yaml file within your new repository is configured properly for successful deployment.

For more information, refer to the DigitalOcean documentation on Deploying Code Changes.

Hope that this helps!

Bobby Iliev
Site Moderator
Site Moderator badge
May 14, 2023

Hi there,

The best way to test your new repository would be to create a new app and deploy it using the new repository. If this all works, you could then edit your App Spec file for your existing app directly and change the reference of your old repository with the new one.

You can modify your App Spec file by going to the DigitalOcean Control Panel -> Apps -> Click on your app -> Go to ‘Settings’ -> Scroll down and click edit next to the ‘App Spec’. In there make the necessary changes.

Make sure to take a backup of the file in case anything goes wrong.

Hope that this helps!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel