> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semgrep.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why did a scan create a duplicate project after a repository was renamed or moved?

> Learn why renaming or moving a repository in your SCM can create a second project, and how to send future scans to the original project.

After you rename a repository or move it to another organization or group in your source code manager (SCM), Semgrep AppSec Platform shows two projects for the same repository:

* The original project, under the old name, with your findings history, triage, and Semgrep Managed Scans results.
* A new project, under the new name, with CI scan results but no findings history.

Triage that you did before the rename isn't lost. It's still in the original project.

## Cause

Semgrep AppSec Platform matches CI scans to projects by name. After the rename, CI scans report the repository's new name. If no project has that name yet, Semgrep AppSec Platform creates a new project.

Semgrep AppSec Platform also syncs projects with your SCM and renames a project when its repository is renamed. If a CI scan runs under the new name before that sync, the scan creates the duplicate project first, and the sync can't rename the original project to a name that's already taken.

Managed Scans are linked to the original project by its ID, so they keep reporting there. That's why CI results and Managed Scans results can end up in different projects. For more information, see [How scans are matched to projects](https://docs.semgrep.dev/deployment/sync-projects-with-scm.md#how-scans-are-matched-to-projects).

## Fix

Rename the duplicate project to a spare name, and rename the original project to the repository's new name. Future CI scans then report to the original project. Existing scans and triage in the duplicate project aren't transferred, so keep the duplicate if you need that history. For more information, see [Fix a duplicate project after a repository move](https://docs.semgrep.dev/deployment/sync-projects-with-scm.md#fix-a-duplicate-project-after-a-repository-move).

## Prevent duplicate projects

The next time you rename or move a repository, rename the Semgrep project to the repository's new name before the next CI scan runs. For more information, see [Move or rename a repository in your SCM](https://docs.semgrep.dev/deployment/sync-projects-with-scm.md#move-or-rename-a-repository-in-your-scm).
