Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to push changes to gitlab due to file size

The local repository has #3 branches: main, dev, fix. I opened a new branch to develop a new feature, branching off from dev. Let's call it F1 for simplicity. Once F1 was created, I started developing and committed locally 4 times. When attempting to push remotely to the GitLab server, I received the following error:

> git push -u origin **F1**
remote: GitLab: You are attempting to check in one or more blobs which exceed the 100.0MiB limit:        
remote: 
remote: - ca6ed555e459936e7ef77058b41f4f2db2a33a26 (965 MiB)        
remote: - 16daf5cf3af682f8aee7e062c9e407c060e57695 (130 MiB)        
remote: To resolve this error, you must either reduce the size of the above blobs, or utilize LFS.        
remote: You may use "git ls-tree -r HEAD | grep $BLOB_ID" to see the file path.        
remote: Please refer to https://gitlab.com/help/user/free_push_limit and        
remote: https://gitlab.com/help/administration/settings/account_and_limit_settings        
remote: for further information.        
To 'https://gitlab.com/**dire_name/repo_name**.git'
 ! [remote rejected]   **F1** -> **F1** (pre-receive hook declined)
error: failed to push some refs to 'https://gitlab.com/**dire_name/repo_name**.git'

It's undoubtedly an issue related to the size of the files I'm trying to push. Using the suggested command and inputting the illustrated IDs, I managed to understand that it depends on two TensorFlow libraries.

  • site-packages/tensorflow/libtensorflow_cc.so.2
  • site-packages/tensorflow/libtensorflow_framework.so.2

To resolve this, I tried some suggestions:

  • Utilize LFS. It is enabled in my GitLab remote repository
  • Refer to https://gitlab.com/help/user/free_push_limit and https://gitlab.com/help/administration/settings/account_and_limit_settings. I do not find this section in my GitLab remote repository

Any suggestion is appreciated. Thanks.

like image 907
stefanoanzilotti Avatar asked Dec 23 '25 02:12

stefanoanzilotti


1 Answers

I managed to understand that it depends on two TensorFlow libraries.

  • site-packages/tensorflow/libtensorflow_cc.so.2

  • site-packages/tensorflow/libtensorflow_framework.so.2

I think you are probably pushing your dependent libraries, which is not necessary. It's generally better to give the users of your repo instructions on how to install those libraries for themselves. For example, here.

It's normal practice to include the site-packages into a .gitignore. In fact, if this is part of a Python virtual environment, add that to your .gitignore. Instead you can generate a requirements file (requirements.txt) using pip. This article should show how.

I also found this about using gitignore files.

like image 91
SimonS Avatar answered Dec 24 '25 19:12

SimonS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!