# Adding Schemas

New schemas can be associated with a repository when they're being created (manually or via schema load).  For existing schemas, using the console [extract command ](https://jadelab.gitbook.io/jadegit/0.12.0/console/extract)is recommended for [migration](https://jadelab.gitbook.io/jadegit/0.12.0/migration/overview) purposes, however these may also be added to a repository when they're first touched (i.e. when you start editing a method), if not already associated with a repository.

In all scenarios you're prompted to select which repository you'd like to associate the schema with. You may also decide to exclude the schema from source control, in which case any changes to the schema will be ignored by source control.

![](https://content.gitbook.com/content/cLHZWeEKASm2P73KsvXm/blobs/kAaCceOQ5gUpDuhGURCa/image.png)

{% hint style="danger" %}
Until support for importing schemas from other repositories can be implemented, schemas need to be added to the same repository as others they're dependent on (super schemas & package providers).  Otherwise, an error will be raised on commit indicating the prerequisite schema is unknown (because it doesn't exist in the repository changes are being extracted to). &#x20;
{% endhint %}

### Committing

When a schema is associated with a repository, a change is recorded against the current branch to add the schema.  On commit, a deep extract of the schema is performed to save all schema entities to the repository.

{% hint style="warning" %}
When adding an existing schema, you may get an error indicating a source component isn't handled.  This occurs when an existing schema contains one or more entities which aren't supported yet.
{% endhint %}
