Git size limit errors and resolutions

Backlog has set Git repository size limits at 10 GB and Git file size limits at 100 MB.

You can learn more about the size limits for Git in this help

Error messages

Git repository

The following messages will prompt when the Git repository size is reaching or approaching the respective limits.

1 GB
This repository has reached 1.0 GB in size. If it exceeds 10.0 GB, it will be put into read-only mode due to Git repository size limits in Backlog.

5 GB
This repository has reached 5.0 GB in size. If it exceeds 10.0 GB, it will be put into read-only mode due to Git repository size limits in Backlog. Please take note of your repository size.

10 GB
The push was rejected because the repository would have exceeded the 10.0 GB limit for Git repository in Backlog. Please reduce the size of the files included in the commits and push again.


Git file size

When the git file size exceeds 100 MB, you will receive the error message below. 

Large files detected. Please consider using Git LFS(Large File Storage). 
File example.png exceeds Backlog’s file size limit of 100 MB. 

Note: Even when a file is deleted from the Git repository, it is still retained in the Git commit history, and the size of the repository is not reduced. To resolve this, you can create a new repository with the instructions suggested below.

 

Resolutions

When Git repository size is limited

If your repository size is limited, you can create a new repository with a copy of your latest commit. 

To do so, please refer to the steps below. 

  1. Set the URL of the current repository
    src_repo=${[ the URL of current repository ]}

  2. Clone with --depth 1 option
    git clone --depth 1 ${src_repo}

  3. Change your working directory to the repository
    cd <the directory of the repository>

  4. Set the latest commit message
    from_commit=$(git log -1 --pretty=%H)

  5. Delete .git directory
    rm -rf .git

  6. Initialize your repository
    git init

  7. Add all file to Git
    git add .

  8. Commit with the comment of the latest commit message
    git commit -m "from ${src_repo} ${from_commit}"

  9. Set the URL for the new repository
    git remote add origin <new url of repository>

  10. Push to the new repository
    git push origin master

 

When file size exceeds 100 MB 

If the file size exceeds 100 MB, it is rejected from pushing to the repository and an error message will appear. Alternatively, you can consider using Git LFS as there are no size file limits for Git LFS.



Related Articles
Git size limit
Git LFS

Was this article helpful?