> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/data-science-lab-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/data-science-lab-1/project/tabs-for-a-data-science-lab-project/tabs-for-pyspark-environment/notebook/notebook-list-page/export/export-to-git.md).

# Export to GIT

A Notebook script can be migrated across the space and server by using the GIT migration option.

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

1. *It is required to set configuration for the DS Lab Migration using the Version Control option from the Admin module before migrating a DS Lab script or model.*
2. *A Data Science Lab notebook has to be exported into Data pipeline before Exporting it into GIT (This will enable the Export to GIT option in the UI).*
   {% endhint %}

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

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FwFBFaZkZcrC0JAagMewj%2FDS%20Lab_Notebook%20migration.gif?alt=media&#x26;token=f66ef2c2-fe09-4aac-b18e-191a976ae607" alt=""><figcaption><p>Migrating a Notebook Script to GIT Repository</p></figcaption></figure>

## Exporting a DSL Script to GIT <a href="#export-a-dsl-script-to-git" id="export-a-dsl-script-to-git"></a>

* Navigate to the ***Notebook list***.
* Click the ***Export*** icon for a Notebook.

<figure><img src="https://2928669267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yFkMe3dnFN9lbRa3Tzd%2Fuploads%2Fp1uO3OM5t76McDLtRzfM%2Fimage.png?alt=media&amp;token=49ea2847-2112-414f-be90-381312a0c363" alt=""><figcaption></figcaption></figure>

* The ***Export to Pipeline/ GIT*** dialog box options.
* Select the &#x45;***xport to GIT*** option.
* Provide a ***Commit Message*** in the given space.
* Click the ***Export*** option.

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FuOrfqKWlk6tYfZWaveU4%2Fimage.png?alt=media&#x26;token=92794b7e-a827-4e81-9e3f-fba3e6ee2716" alt=""><figcaption></figcaption></figure>

* A notification message appears, and the selected Script gets migrated to GIT repository.

<figure><img src="https://2928669267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yFkMe3dnFN9lbRa3Tzd%2Fuploads%2FpLgB6ToXQJ1GwyvZClbo%2Fimage.png?alt=media&amp;token=f82bda3c-b0ae-4e2a-9927-f1de232ed319" alt=""><figcaption></figcaption></figure>

## Importing a DSL Script from GIT <a href="#import-a-dsl-script-from-git" id="import-a-dsl-script-from-git"></a>

After exporting a DSL script, you can Sign-in to another user account on different space or server and import the DSL script by using the below-given set of steps.

* Click the ***Admin*** module from the ***Apps*** menu.      ​

<figure><img src="https://2928669267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yFkMe3dnFN9lbRa3Tzd%2Fuploads%2FAJbllulGBC8EWW5Ajmv9%2Fimage.png?alt=media&amp;token=e4a43378-6e96-4ae1-b046-0fb0b6d2c94f" alt=""><figcaption></figcaption></figure>

* Select the ***GIT Migration*** option from the admin menu panel.
* Click the ***Import File*** option.      ​

<figure><img src="https://2928669267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yFkMe3dnFN9lbRa3Tzd%2Fuploads%2FuBRJsN3ZCj5rShvCT26g%2Fimage.png?alt=media&amp;token=98d7c84a-699b-4c42-9d90-0458fbb1dd99" alt=""><figcaption></figcaption></figure>

* The Import Document page opens, click the ***Import*** option.      &#x20;

<figure><img src="https://2928669267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yFkMe3dnFN9lbRa3Tzd%2Fuploads%2FqxhMDSDR4u4mII3wFrsE%2Fimage.png?alt=media&amp;token=f239a912-b5dc-41fa-ae55-545f4e703dea" 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 Notebook option from the left side panel.
* All the migrated Notebooks get listed.

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FP9EeHA0XIXOiqlnMHHQR%2Fimage.png?alt=media&#x26;token=8592762e-b3f6-4b59-b6ec-fd40619e8e39" alt=""><figcaption></figcaption></figure>

* Select a Notebook from the displayed list to open the available versions of the that Notebook.

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FzBuctnWFGWBh2H6I4GBs%2Fimage.png?alt=media&#x26;token=55aa9fbf-6bbb-4717-920e-884280cf8867" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FZL01lOyKl8bbMfns9een%2Fimage.png?alt=media&#x26;token=7c455003-7a9c-4af1-84e0-e3ab63a087fb" alt=""><figcaption></figcaption></figure>

* The Data Connector Details dialog box opens.
* Choose one connector from the Existing Connectors or Create a New Connector.
* Click the ***Save*** option.

![](https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2F5JOlW01SthLKCsaIvGVr%2Fimage.png?alt=media\&token=5a892e90-bc24-4e46-886f-8a90d1879a28)

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

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2F6IqtLbjuGBXDQoCgRm9f%2Fimage.png?alt=media&#x26;token=6602471f-2e9d-45f0-97fc-b8c06f338745" alt=""><figcaption></figcaption></figure>

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

* *The user can migrate only the exported scripts (the exported scripts to the Data Pipeline).*
* *Refer the **Data Science Lab Quick Start Flow** page to get an overview of the **Data Science Lab** module in nutshell.* [***Click here***](/data-science-lab-1/data-science-lab-quick-start-flow.md) *to get redirected to the quick start flow page.*
  {% endhint %}
