# Export to GIT

{% hint style="warning" %}
*<mark style="color:orange;">**Prerequisite**</mark><mark style="color:orange;">:</mark> The user must do the required configuration for the **DS Lab Migration** using the **Admin module** before migrating a DS Lab script or model.*
{% endhint %}

## Export a DSL Model to GIT <a href="#export-a-dsl-model" id="export-a-dsl-model"></a>

{% hint style="success" %}
*Check out the walk-through on how to migrate/ export a model to the GIT Repository.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FbQPJFCv5gSxirSI2r1MD%2FExporting%20a%20Model%20from%20the%20RSP%20to%20GIT.mp4?alt=media&token=f95427ae-90eb-4cba-bb9d-ed25fc593719>" %}
***Exporting a Model to GIT***
{% endembed %}

* Navigate to the ***Model*** tab.
* Click the ***Export*** icon for a Model.

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2F1XaD4swGtUl16O132G2s%2Fimage.png?alt=media&#x26;token=808da92f-523e-4392-b783-d0b13d57f3be" alt=""><figcaption><p><em><strong>Export to GIT</strong></em></p></figcaption></figure>

* The ***Export to GIT*** dialog box opens.
* Provide a ***Commit Message*** in the given space.
* Click the ***Yes*** option.

&#x20;      ![](https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FZvEEcRK0emlTZuQWmrrT%2Fimage.png?alt=media\&token=00a1440e-7d53-4a19-a88a-a6c33f343de6)&#x20;

* A notification message appears informing that the model is migrated.

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FXOyZ9VPWFL1StHhw5Nqq%2Fimage.png?alt=media&#x26;token=af5db9d4-2aa6-44d0-b39a-79d33841ed2c" alt=""><figcaption><p><em><strong>Notification message after exporting a model</strong></em></p></figcaption></figure>

## Import a DSL Model from GIT <a href="#import-a-dsl-model" id="import-a-dsl-model"></a>

{% hint style="success" %}
*Check out the given walk-through to understand the import of a Migrated DSL Model. inside another user under a different space.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2Fu2BiGXoxGvwgo6GaRSwu%2FImporting%20a%20Model%20from%20GIT_RSP.mp4?alt=media&token=161855f8-2e55-4df4-a425-db7ae5052aad>" %}
***Importing the Exported DSL model***
{% endembed %}

Choose a different user or another space for the same user to import the exported model. In this case, the selected space is a story that is not the same space from where the model was exported.

* Select a different tenant space while signing in to the platform.&#x20;

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FCewRdVqf2MbqRH7dEbGS%2Fimage.png?alt=media&#x26;token=bf8e54cb-f69a-4eba-bf1a-8fec5856acf0" alt=""><figcaption></figcaption></figure>

* Navigate to the ***Admin*** module.
* Select the ***GIT Migration*** option from the admin menu panel.
* Click the ***Import File*** option.​

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FzPHhNSPxS90iBy7JidJW%2Fimage.png?alt=media&#x26;token=62e4e361-1b6c-4f07-a875-e100d6aaeca2" alt=""><figcaption></figcaption></figure>

* The Import Document page opens, click the ***Import*** option.

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2F5LEfy2vbljqhrvmvscc7%2Fimage.png?alt=media&#x26;token=66250f57-d746-4809-88bc-9374763a9284" alt=""><figcaption></figcaption></figure>

* The ***Migration- Document Import*** page opens.
* Select ***New VCS*** as Version Control Configuration.
* Select the ***DSLab*** option from the module drop-down menu.
* Select the ***Model*** option from the left side panel.
* Use ***Search space*** to search for a specific model name.
* All the migrated ***Models*** get listed based on your search.

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2F9bNFavWjzFM3DnIb91qO%2Fimage.png?alt=media&#x26;token=4b4ab822-e8fa-4a01-9c06-5c98a48bd825" alt=""><figcaption></figcaption></figure>

* Select a ***Model*** from the displayed list to get the available versions of the that Model.

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2Fq6e2gKoigKSIPMumTjPT%2Fimage.png?alt=media&#x26;token=ecbe5947-c15c-4fb6-a42e-a33e00708f29" alt=""><figcaption></figcaption></figure>

* Select a ***Version*** that you wish to import.
* Click the ***Migrate*** option.

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FTnI5JenWiSk3uJYTNJPp%2Fimage.png?alt=media&#x26;token=14015edb-26aa-4cc0-b7a3-98f256f6a832" alt=""><figcaption></figcaption></figure>

* A notification message appears informing that the file has been migrated.

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FJMrZDPv1rMVwg60BeGQY%2Fimage.png?alt=media&#x26;token=e5fdba4b-eccb-490f-a08b-06bcc287650b" alt=""><figcaption></figcaption></figure>

* The migrated model gets imported inside the Model tab of the targeted user.&#x20;

<figure><img src="https://4082649235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QeOywZjV1cHo55cMW8u%2Fuploads%2FXeiiTOyX4GDmFbooOFWV%2Fimage.png?alt=media&#x26;token=8df50502-b5d7-485b-950f-388541ae136d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*&#x20;

* While migrating the ***Model*** the concerned ***Data Science Project*** also gets migrated to the targeted user's account.
* *Refer the* [***Data Science Lab Quick Start Flow***](https://docs.bdb.ai/data-science-lab-4/data-science-lab-quick-start-flow) *page to get an overview of the **Data Science Lab** module in nutshell.*&#x20;
  {% endhint %}
