Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I prevent large files being pushed to bitbucket?

al_stewart
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 7, 2020

I am setting up a repo on bitbucket.org which will be mirrored on an onsite bitbucket server.

Commits, PRs, merges etc will initially be done on bitbucket.org, and the changes pushed to the onsite one via a manual process. 

The onsite server has been set up with a filesize limit of 2MB. (There's nothing I can do about that. From a project perspective that limitation is OK, I'm happier dealing with that than mess around with LFS.)

I want to make sure the same rule is applied to pushes made to the bitbucket.org repo.

If someone accidentally pushes a file larger than 2MB, I can see severe problems keeping the repos in sync.

 

EDIT:

an alternative would be to do a check at PR/merge time, as I'm probably only syncing the dev branch.

 

1 answer

0 votes
Joao Sgreccia
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 7, 2020

Hi @al_stewart ,

One possible solution is to configure a local hook(pre-commit) to check the file sizes before committing the content.

Cheers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events