Import From Repository
If you already have an Appsmith App in a Git repository, you can import it to a new workspace or a different Appsmith account.
Follow the steps given below:
- On the Appsmith workspace home, click on desired workspace Menu button and select Import.
- Choose the Import from a Git repository option on the import application pop-up.
- On the import from the Git repository modal, add your Repository’s SSH URL and click on Generate key and copy the key.
- Add the Deploy key to your repository.
- GitHub
- GitLab
- Bitbucket
- In your repository, go to the Settings tab.
- On the navigation bar, under Security, click Deploy Keys.
- Click Add deploy key. Add a title for the key and paste the generated
SSH key
in the Key input box. - Select the Allow write access checkbox.
- Click Add key.
- Open your repository and from the sidebar, go to the Settings > Repository and expand the Deploy keys section.
- Click Add key. Add the title and paste the generated key in the key section.
- Enable the Grant write permissions to this key checkbox
- Click Add key.
- Open Personal Bitbucket settings from the top right corner and under security go to SSH keys.
- Click Add key, add the label and paste the generated key in the Key input box.
- Go back to the Git connection modal and click Import.
- Once the import is complete, you’ll see a Reconnect Datasources modal where you can configure the data sources used by the imported Application. Appsmith doesn't export any configuration values used for connecting a data source. So either you have to configure it in the Reconnect Datasources modal, or you can skip this and choose to configure it later.
If the imported workspace already has a datasource with the same name but a different type, the import fails due to name conflicts. For example, a git-connected application has a MongoDB data source - "movies" and you are importing it to a workspace that has a Postgres data source also named "movies." In such a case, the import fails.
Sync branches
To sync the local with the remote branch (fetching or pruning), click on the branch pop-up and hit the Sync branches button. Syncing the branches won’t merge any change you’ve made on the remote branch. You’ll have to click on the pull button to get the latest changes.