> For the complete documentation index, see [llms.txt](https://help.sleuth.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/move-code-deployments.md).

# Move code deployments

We get it, things change. Sometimes it's a change to your development process or your product architecture, or sometimes you just realize after configuring your initial hierarchy of Projects, Environments, and Code Deployments in Sleuth that there was a better way you could have done things.

Fortunately, Sleuth provides the ability to easily move existing Code Deployments from one Project to another while maintaining each Deployments's full history and impact on project-level metrics.

To move a Code Deployment (and all of its Deploys) from one Project to another, perform these steps:

* Open the "source" Project, navigate to the Code Deployment you'd like to move, expand the cog, and select **Move code deployment**.

  <figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FT6ack2azOUCJh3JQksPa%2Fimage.png?alt=media&amp;token=621c1db9-8759-47c1-ace1-0807c13dff6b" alt=""><figcaption></figcaption></figure>
* In the next screen, select the "target" Project (i.e. the Project you'd like to move this Deployment to), and specify Environment mappings between the two Projects:

  <figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FGbkX8biQftdrTyAzKvoN%2Fimage.png?alt=media&amp;token=c1a06da3-200c-4a70-8fb1-efc0bb7835d0" alt=""><figcaption></figcaption></figure>
* For any of source environments that do not have a corresponding environment in the target Project, select "Do not map." Note, however, that ***this action will irrevocably delete all historical deploy data*** for that source environmen&#x74;***.*** Sleuth will ask you to confirm:

  <figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FOc3CECXqoBfL4Uf25mT0%2Fimage.png?alt=media&amp;token=fa242d68-53ab-4720-ad9b-178634b7d1d2" alt=""><figcaption></figcaption></figure>
* It is not currently possible to map a single source environment to multiple target environments
* Click **Save** to initiate the move. Note that a code deployment might be in motion for as long as 30 minutes. You can freely move additional code deployments during this time, but it is recommended that you wait until all code deployments have finished moving before evaluating metrics data for any source or target projects.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/move-code-deployments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
