---
title: "Import from Git V2: Maintain Sync Link Imports"
language: "en"
url: "https://docs.testany.io/en/docs/import-from-git-v2-manage-sync-link/"
markdown_url: "https://docs.testany.io/en/docs/import-from-git-v2-manage-sync-link.md"
translation: "https://docs.testany.io/zh/docs/import-from-git-v2-manage-sync-link.md"
last_updated: "2026-03-26T15:39:24+08:00"
---

# Import from Git V2: Maintain Sync Link Imports

## 1. What Sync Link means

`Sync Link` creates a persistent relationship between:

- a Testany import history
- the selected Git files
- the resulting Test Cases

In this mode, scripts are fetched from Git at execution time.

This means the import history does **not** rely on a Testany-managed Mirror for execution.

## 2. Read the detail page

Open `Import History` and then open a record with the `SYNC LINK` badge.

![Sync Link import history detail](https://docs.testany.io/docs/images/en/import-git-v2-sync-link-detail-en.png)

The page usually contains:

- `Basic Info`
- `Remote Code Status`
- `Pending Relation Changes`
- `Associated Files`
- `GitHub Webhook Sync`
- `Sync History`
- `Danger Zone`

## 3. Sync Link in Track Latest mode

In `Sync Link + Track Latest`:

- execution always follows the current branch latest commit
- the detail page does **not** provide code-layer `Sync`
- new files and deleted source files must still be handled manually

The `Remote Code Status` area shows:

- `Current latest commit`
- `Relation baseline commit`
- `Last change detected at`


> **Note**
>
> This is a key V2 behavior. `Track Latest` does not mean “automatically create new Test Cases for new files” or “automatically remove deleted files.”


## 4. Sync Link in Pinned Commit mode

In `Sync Link + Pinned Commit`, the import history is locked to one commit.

The detail page lets you use:

- `Switch Commit`
- `Switch to Track Latest`

This mode does not support webhook sync or code-layer sync. To move forward, you must explicitly switch commit or leave pinned mode.

## 5. Handle relationship changes explicitly

In `Pending Relation Changes`, Sync Link separates relationship maintenance from code tracking.

### 5.1 Import Added Files

Use `Import Added Files` when the latest snapshot discovers new supported files that are under the import root but not yet part of this import history.

This action creates:

- new Test Cases
- new bindings in the same import history

### 5.2 Mark Source Deleted

Use `Mark Source Deleted` when a previously tracked file no longer exists in the Git source.

This action:

- marks the binding as `source_deleted`
- does **not** automatically delete the Test Case

If the file is still referenced by pipelines, review the impact before confirming.

## 6. Configure GitHub Webhook Sync

`GitHub Webhook Sync` is available when the import history is in `Track Latest`.

Its job in Sync Link mode is to:

- receive GitHub push events
- trigger sync checks when needed

It does **not** directly create new Test Cases or delete existing ones.

### 6.1 How to set it up

1. In Testany, click `Configure Webhook`.
2. Copy the generated `Webhook URL`.
3. Copy the generated `Secret`.
4. In GitHub, open the repository webhook settings.
5. Configure a `push` webhook with that URL and secret.
6. Return to Testany and verify deliveries.

### 6.2 Tracking scope

The webhook panel also allows a tracking scope with include/exclude rules. Use it when you only want part of the repository to trigger sync checks.

### 6.3 Pinned mode limitation

If the import history is pinned to a commit, webhook sync is unavailable until you switch back to `Track Latest`.

## 7. Review Sync History

Use `Sync History` to review the past sync checks and outcomes for this record.

This helps answer questions like:

- when Testany last detected upstream code changes
- whether a sync check failed
- whether the current relationship snapshot is stale

## 8. Delete a Sync Link import history

In `Danger Zone`, `Delete Import History` removes the import history and deletes all associated Test Cases.


> **Warning**
>
> This action is irreversible. Review pipeline references and business ownership before deleting the record.

## Glossary terms on this page

- [Import History](https://docs.testany.io/en/docs/glossary.md#import-history)
- [Test Case](https://docs.testany.io/en/docs/glossary.md#test-case)
- [Mirror](https://docs.testany.io/en/docs/glossary.md#mirror)
- [Sync Link](https://docs.testany.io/en/docs/glossary.md#sync-link)
