# 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](/content/docs/getting-started/publishing-your-app#host-your-code-on-github/index.html) guide.

## [Git tools](/content/docs/integrations/github#git-tools/index.html)

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](/content/docs/integrations/github#github-desktop/index.html)

[GitHub Desktop](https://github.com/apps/desktop) is a great option for beginners, as it provides a user-friendly desktop interface for using Git.

### [Git CLI](/content/docs/integrations/github#git-cli/index.html)

The [Git CLI](https://git-scm.com/) is suited for power users who are comfortable with the command line and have more complex Git workflows.

## [Troubleshooting](/content/docs/integrations/github#troubleshooting/index.html)

### [Why do I get an error when I sync changes?](/content/docs/integrations/github#why-do-i-get-an-error-when-i-sync-changes/index.html)

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

### HTTP Error: 500 Internal Server Error

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

### [Reset Git history](/content/docs/integrations/github#reset-git-history/index.html)

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](/content/docs/releases/0.7.5) 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](/content/docs/integrations/github#i-cant-access-all-my-github-repos/index.html)

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.

[Add Template\  \ If you'd like to add a template to Dyad Hub, follow these steps.](/content/docs/templates/add-template/index.html) [Supabase\  \ Use Supabase for auth, database and server functions.](/content/docs/integrations/supabase/index.html)
