# Blueprints as code

> Synchronize blueprints with a remote source code repository

---

Site [llms.txt](/llms.txt)

---

Once a blueprint is linked to a repository, you can push it, preview the changes, and later refresh the blueprint from the repository. You can also create a blueprint from one already in a repository. This requires a repository linked to Cloud Management Platform (CMP) and repository credentials on your profile so commits are attributed to you. See [Integrate a remote source code repository](/docs/cmp/configure/integrations/source-code-repository/).

## Push and refresh a blueprint

Open the blueprint from the **Catalog**, then select its repository tab. The tab is named **Repository** until the blueprint is linked to a repository; then it is named **GitHub** or **GitLab**.

**Push to Remote Source** opens a form for a **Repository**, **Branch**, and **Commit Message**. If the blueprint has been pushed before, select **Preview** first to see what changed. After the push, the result includes a link to open a pull request.

**Refresh from Remote Source** prompts for a **Repository** and **Branch**, then updates the blueprint in CMP based on the repository's contents. It appears once the blueprint has been pushed or created from a repository, as well as **Delete**, which removes the blueprint's files from the repository and commits the deletion. The blueprint stays in CMP.

<div class="alert alert-info" role="alert">


A blueprint that came from a repository is read-only unless **Remote Content Mode** in [Miscellaneous Settings](/docs/cmp/configure/administration/system/miscellaneous-settings/) allows editing. While it is read-only, **Push to Remote Source** is disabled.
</div>


## Create a blueprint from a repository

1. Go to the **Catalog**.
1. Select **From Repository**.
1. Provide a **Repository**, **Branch**, and **Blueprint JSON File**.
1. Select **Save**.

## Related

- [Integrate a remote source code repository](/docs/cmp/configure/integrations/source-code-repository/): Linking a repository and setting credentials for your commits.
