# Migration

To use jadegit for existing systems, the following steps need to be carried out to initialize the source code repository.

## Create Repository

Make a new folder and initialize a new bare repository using git init.

![](https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2FK1q65kD8XB2lQ2ndl8RB%2Fimage.png?alt=media\&token=a78d9497-b109-403f-bb41-b8af4b4af2f1)

## Extract Schemas

As the extract can take awhile, it's recommended existing schemas be extracted from a backup of production systems, taken after the last code release.

All existing schemas can be extracted using the following commands.  The extract command stages changes in-memory until they're committed.  Schemas may also be extracted more selectively using a specific regex and/or list of schema names.

![](https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2FmZcWRzy9HFOTC2PHrV1k%2Fimage.png?alt=media\&token=3b68d20b-268e-4fa9-88c1-6829af30e07d)

### Initial Commit

Once schemas have been extracted, the changes staged need to be committed using the commit command.

![](https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2F4MeOjkcI7pGalkFl78nJ%2Fimage.png?alt=media\&token=b2bcafc8-710a-4cb1-a205-b7cdf5c3aa09)

## Remote Push

Once ready, the local repository needs to be pushed to a remote repository developers can clone.

This depends on setting up a new remote repository using your preferred platform (GitHub, GitLab, Azure DevOps).  Once created, it can be added to the local repository and then pushed to.

![](https://3850210453-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LiuZvEx90WVx-LnSKG_%2Fuploads%2FwPyoZGJoSeff1Yt9yU4n%2Fimage.png?alt=media\&token=0b1b942f-2660-4fb7-b75c-4ac965ec2aee)
