www/apps/cloud/app/projects/rename-repo-branch/page.mdx
import { EllipsisHorizontal } from "@medusajs/icons" import { InlineIcon } from "docs-ui"
export const metadata = {
title: Rename Project's Repository or Branch,
}
In this guide, you'll learn how to handle renaming your Cloud project's Git repository or its main branch, and how it affects your Cloud project.
If you rename the Git repository of your Cloud project, Medusa will automatically update the repository URL in your Cloud project settings to reflect the new repository name.
However, you need to ensure that your GitHub connection is configured to give Medusa access to the renamed repository. This is necessary for Medusa to continue fetching your code and deploying your environments on Cloud.
To reconfigure your GitHub connection after renaming your repository:
If your repository is an organization repository, ensure that the GitHub organization also has the renamed repository in its list of repositories that Medusa can access.
If you rename the branch associated with an environment of your Cloud project, you need to update the deployment rules of that environment to use the new branch name.
To rename the branch associated with an environment of your Cloud project:
branch rule. You can edit it by clicking the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> icon and choosing "Edit" from the dropdown.main to staging to create a new deployment every time you push a commit to the staging branch.The deployment rules will take effect for next deployments. So, the next time you push a commit to the renamed branch, it will trigger a new deployment of the environment.