---
schema_version: "1"
id: 66729efd257721e32a993750d51b0e238127468fc1fd9bd656b3e711e854c243
title: Edit API Specifications Offline and Sync Them with MuleSoft VCS
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/studio/sync-api-projects-design-center.md
canonical_url: https://docs.mulesoft.com/studio/sync-api-projects-design-center
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ec62346f49da0d382dd9c051e26f735e80f7e281831fabc4aff43beea1f5b366
description: MuleSoft Documentation Site
latest: true
---
---
product: Studio
---

# Edit API Specifications Offline and Sync Them with MuleSoft VCS

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Import a RAML, OAS 2.0, or OAS 3.0 API specification from MuleSoft VCS into an API specification
project in Anypoint Studio to edit it offline. Then stage and push your changes as you would with
any version control system (VCS).

This feature only works when importing an API from MuleSoft as shown in the following process.

To import an API specification to write a Mule application implementation see
[Import and Implement an API Specification from MuleSoft VCS](https://docs.mulesoft.com/studio/import-api-specification-design-center).

Your API specification project must have a different name than any other project in your workspace.

> [!NOTE] Studio uses the EGit plugin only for the VCS feature of editing API specifications
> offline. Studio does not support the EGit plugin for Mule application projects that you might
> track using your own VCS.

## Import an API Specification From MuleSoft VCS To Edit Locally

1.  Ensure that no other project in your workspace has the same name as the API project you want to
    import.

2.  In the taskbar at the top of the Anypoint Studio display, select **File** > **Import**.

3.  Select **Anypoint Studio** > **API Specification from MuleSoft VCS**.

4.  In the **Import From MuleSoft VCS** window, select your Anypoint Platform username and the
    Anypoint Platform business group where the API specification is located.

    ![A window with fields for importing an API from MuleSoft VCS, including a list of available APIs](/mulesoft/current/en-us/studio/_images/username-and-bg-studio.png)

    If you are not logged in, click the **Add Account** button to add your Anypoint Platform
    account. If you have not configured your Anypoint Platform credentials, the username and
    business group options are unavailable.

    If you want to use a different account, click the **Add Account** button and log in again.

5.  From the list of available APIs, select the one you want.

6.  Click **Finish**.

Studio imports the API specification as an API specification project so that you can work on your
API specification project offline.

## Create Branches

You can create your own branch based on the branch you pulled from MuleSoft VCS.  
Using a different branch allows you to modify the API definition without risking pushing those
changes to the main branch in MuleSoft VCS.

To create a different branch in Studio:

1.  In the Package Explorer view, right-click your API specification project and select **Team** >
    **Switch To** > **New Branch**.

    ![New branch highlighted in the context menu](/mulesoft/current/en-us/studio/_images/switch-to-new-branch.png)

2.  In the **Create Branch** window, configure your new branch:

    ![\*Branch name\* field, \*Configure upstream for push and pull\* option, and \*Check out new branch\* option highlighted in the \*Create Branch\* window](/mulesoft/current/en-us/studio/_images/create-new-branch.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>In the <strong>branch name</strong> field, type the name of your new branch.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>You can select the <strong>Configure upstream for push and pull</strong> option if you want to also pull changes from MuleSoft VCS into your local branch.<div><p>When configuring this option, you must select the behavior you want Git to have when it pulls the changes from MuleSoft VCS.</p></div></td></tr><tr><td><i data-value="3"></i><b>3</b></td><td>Select the <strong>Check out new branch</strong> for Git to switch to this new branch as soon as you create it.</td></tr></tbody></table>

3.  Select **Finish**.

With a newly created branch, you can start committing your changes.

## Commit Changes to Your API Specification Project

The VCS in Studio tracks every change you make to your project and shows them in the **Unstaged
Changes** area of your **Git Staging** view.

You can track your changes to a file by right-clicking it in the **Unstaged Changes** section and
selecting **Compare with index**:

![\*Compare with index\* menu option highlighted in the \*Unstaged Changes\* window.](/mulesoft/current/en-us/studio/_images/compare-with-index.png)

After applying your changes, add them to your index:

![\*Add selected files to the index\* and \*Use the Add all files including not selected ones to the index\* icons highlighted in the comparison window.](/mulesoft/current/en-us/studio/_images/compare-to-index-view.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>Use the <strong>Add selected files to the index</strong> icon to stage for commit the files that you selected.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>Use the <strong>Add all files including not selected ones to the index</strong> icon to stage for commit all unstaged changes.</td></tr></tbody></table>

When you staged the changes that you want to commit, write a commit message in the **Commit
Message** section:

![\*Commit Message\* section highlighted.](/mulesoft/current/en-us/studio/_images/add-commit-message.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>Select <strong>Commit and Push</strong> to also push the change to MuleSoft VCS.<div><p>See <a href="#push-branch">Push Your Branch to MuleSoft VCS</a> below for more information.</p></div></td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>Select <strong>Commit</strong> to add the commit to your local copy.</td></tr></tbody></table>

See [Git Staging View Reference](https://docs.mulesoft.com/studio/git-staging-view-reference) for more information about this view.

## Merge Your Changes into the Main Branch

You can merge the changes made in your local branch to the main branch to push to MuleSoft VCS:

1.  In the Package Explorer view, right-click your API specification project and select **Team** >
    **Merge** > **Push Branch**.

    ![\*Merge\* option highlighted in the context menu.](/mulesoft/current/en-us/studio/_images/merge-menu.png)

2.  Select the local branch to which you want to merge your changes:

    ![Local branch highlighted in the \*Merge\* window.](/mulesoft/current/en-us/studio/_images/merge-view.png)

3.  Select **Merge**.

## Push Your Branch to MuleSoft VCS

You can choose to publish your local branch to MuleSoft VCS after you committed all your changes to
your local branch:

1.  In the Package Explorer view, right-click your API specification project and select **Team** >
    **Switch To** > **Push Branch**.

    ![\*Push branch\* option highlighted in the Mule project context menu.](/mulesoft/current/en-us/studio/_images/push-branch.png)

2.  Verify the changes that you are pushing to MuleSoft VCS.

    ![\*Push Branch\* window options highlighted.](/mulesoft/current/en-us/studio/_images/push-branch-view.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>The <strong>Source</strong> section shows the changes that you are pushing to MuleSoft VCS.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>The <strong>Remote</strong> section shows the coordinates to the remote you are pushing to.</td></tr><tr><td><i data-value="3"></i><b>3</b></td><td>The <strong>Branch</strong> section shows the local branch that you are pushing.</td></tr><tr><td><i data-value="4"></i><b>4</b></td><td>You can select the <strong>Configure upstream for push and pull</strong> option if you want to also pull changes from MuleSoft VCS into your local branch.<br>When configuring this option, you must select the behavior you want Git to have when it pulls the changes from MuleSoft VCS.</td></tr><tr><td><i data-value="5"></i><b>5</b></td><td>Select the <strong>Force overwrite branch in remote if it exists and has diverged</strong> only if you know that your local changes must overwrite the changes in MuleSoft VCS.<br>This option force pushes your changes to the branch in MuleSoft VCS.</td></tr></tbody></table>

3.  Select **Preview** to see a summary of the changes you are pushing.

4.  Select **Push**

In certain scenarios, someone else might have modified the version in MuleSoft VCS while you
modified the same version locally. This triggers conflicts in Git.  
See [Solve Conflicts](https://docs.mulesoft.com/studio/solving-conflicts-api-projects) for more information.

## See Also

- [OpenAPI Specification 3.0 Support Release Notes](https://docs.mulesoft.com/release-notes/platform/oas3)
