Dyad LogoDyad

GitHub

Learn how to sync your code to GitHub

Dyad has built-in integration with GitHub, making it easy to push your local changes to a GitHub project.

For step-by-step instructions, see the Publishing your App guide.

Git tools

For most use cases, you don't need to use other Git tools—Dyad handles the core workflow. But for advanced workflows, you may want to use one of the tools below.

GitHub Desktop

GitHub Desktop is a great option for beginners, as it provides a user-friendly desktop interface for using Git.

Git CLI

The Git CLI is suited for power users who are comfortable with the command line and have more complex Git workflows.

Troubleshooting

Why do I get an error when I sync changes?

There's a few different reasons why syncing changes can fail. Please follow the instructions based on the error message that you get.

Push timed out

If clicking on Sync to GitHub consistently results in request timed out, we recommend following the steps to reset Git history.

HTTP Error: 500 Internal Server Error

The 500 error means that GitHub has rejected your push.

The simplest way to resolve this is to reset Git history.

Push rejected because it was not a simple fast-forward. Use "force: true" to override

This can happen if you've made changes to your GitHub repo outside of Dyad, such as directly in the GitHub web UI.

In that case, you'll need to use a Git tool to sync your changes manually (at least once). This typically involves pulling changes from the remote repo or force-pushing your local changes.

If you don’t need the changes made outside of Dyad (e.g. they were accidental), you can:

  1. Disconnect the GitHub repo in the App Details page.
  2. Delete the repo on GitHub.com.
  3. Use Dyad to create a new repo.

Then, you can continue syncing through Dyad as usual.

You don't have to make all your changes in Dyad, but if you edit your codebase elsewhere, you may need to use advanced Git commands to keep everything in sync.

Reset Git history

If you want to reset your app's Git history, the simplest way to do this is to make a copy of the app without history.

You can do this by copying your app on the app details page. Go to the app details screen by clicking on the app name in the top-left corner and then click on the overflow menu in the top-right corner and then click Copy app. In the dialog, click Copy app without history. See the video in the link for reference.

Try pushing to GitHub with your copied app and it should succeed. At this point, you should develop on your copied app. You can keep the original app for reference.

I can't access all my GitHub repos

When you first connect Dyad to GitHub, you grant access to specific GitHub organizations. If you want to add access to more orgs later:

  1. Go to the Settings page.
  2. Under the Integrations section, click Disconnect from GitHub (red button).
  3. Reconnect to GitHub and grant access to the desired organizations.

On this page