Hi @Nagaraja _MicroGenesis TechSoft_,
If you are an admin of the repo, you can find this on Bitbucket Cloud website.
The page that opens with the Repository details has info on the Size (size of the core .git repo) and also Git Large File Storage (size of LFS files).
Please be mindful that if you use Git commands to find the LFS size locally, this may not always correspond to the actual value of Git LFS size on Bitbucket. For example, if you rewrite history in the repo to remove some LFS files, this will only affect the pointers in the core repository, LFS files will not be deleted. In this case, the LFS files stored in the repo will be more than what your clone will fetch locally.
The most reliable way to get the size is via the Repository settings page.
Please feel free to reach out if you have any questions!
Kind regards,
Theodora
Hi @Nagaraja _MicroGenesis TechSoft_ .
You could use the Forge app described in this article:
For your use case, the app also adds the size information in the repository overview for each user to see.
It looks like this:
The app also adds a Workspace Settings Menu page with the size of all repositories in a workspace and a download option to export the information in a CSV file, you can disable that if that’s not required.
I’m showing how the app works in this YouTube video.
At this stage we can only show the size of the repository itself, not including the LFS as there isn’t an API to retrieve that information.
Caterina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nagaraja _MicroGenesis TechSoft_
This DOC should help shed light to your question: https://confluence.atlassian.com/bbkb/what-are-the-repository-and-file-size-limits-1167700604.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kugbe,
Is it possible to get repository LFS file size using repository URL in Rest API call?.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, while the Bitbucket REST API does not provide direct LFS size details, you can use the general repository API call for overall repository size and local Git commands to get specific LFS file sizes.
These DOC could help:
https://support.atlassian.com/bitbucket-cloud/docs/use-git-lfs-with-bitbucket/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would be grateful if you could impart the API endpoint and the necessary Git commands to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for better outlook this DOC can also help: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories
This should help:
curl -u username:api_token https://api.bitbucket.org/2.0/repositories/username/repo_slug?fields=size
- This will get you started, but it is a process that will lead to cloning the repo, looking through the repo..., find all files needed and their sizes and including creating a script to sum up all LFS file and file sizes.
This command will help you list all files and their sizes:
git lfs ls-files
Hope that helps, good luck! (:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need to check the repository size and LFS file size before cloning the repository.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.