All Products
Search
Document Center

Alibaba Cloud DevOps:Clean up large files introduced by Agit centralized review

Last Updated:Apr 29, 2025

Learn about how to clean up the large files introduced by Agit centralized review. This helps optimize storage and enhance system performance.

Formation

  • Centralized reviews may result in submissions that include large files.

  • Before submission, large files do not appear in any existing branches or tags of the repository. Instead, they exist in a special reference created by the review, to prevent the source submission from being revoked (for more information, see the principle of git gc). Consequently, even after closing the review and performing a forced Garbage Collection (GC), these large files can not be cleared from remote repository.

Cleanup

  1. Locate the review page associated with the large files and close the review if it is open.

  2. Identify the special reference created by the review, as illustrated below:

    The review exists still

    1

    As depicted above, the content to the right of -> is the reference generated by the review: refs/merge-requests/1367177/head.

    The review does not exist

    image

    Find the review ID in the page. As shown above, the number following merge_request in the page URL is the review ID. And then concatenate the special reference. For example, if the review ID is 1367177, the special reference is: refs/merge-requests/1367177/head.

    Get the review staging reference

    image

    Click the commit ID of the review source and copy the commit ID from the commit product page, as shown below:

    image

    The commit ID is: 2a2d43d8daa87b28e71067d5d0681a23c3ba5105, and the staging reference for the review is: refs/keep-around/2a2d43d8daa87b28e71067d5d0681a23c3ba5105.

  3. Remove the special reference using the following commands:

    cd your_local_repository
    git push origin :refs/merge-requests/1367177/head
    git push origin :refs/keep-around/6349273477adaa3b9d18fea9033fe01f26656a1d
  4. In the repository settings page, navigate to storage space management, and select Clear > Immediately delete data.

    高的 - 2024-11-22T133552