0

I noticed that my git repo contains some large folders which were unnecessary and therefore used

git rm -r --cached /folders/not_needed_folder/

to untrack them, however when I try to perform git push the process takes a very long time to get completed and writes very big objects on the cloud and it fails most of the time(see please the picture below).

1

I noticed that my git repo has a very large package with like 10 GB size, does it help/hurt if I remove this package (image below)?

2 - I tried git -rm -r to untrack the files I don't need. git gc --aggressive didn't help.

instead of uploading 3 GB and failing I expected, as usual, that it will upload much smaller amount of data (like 10-20 MB).

Ali Nejad
  • 23
  • 8
  • Are the files in your remote repo? If not you have to remove the files from the commit where you added them(I recommend an interactive rebase) – dan1st Jul 16 '19 at 15:30
  • 1
    If the files are already part of the history of the project, when you push into a remote that doesn't have those revisions with those files, they will be pushed (they are part of the history of the project already so....). You might need to do a rewrite of the history of the branches in order to remove them. – eftshift0 Jul 16 '19 at 15:41
  • 1
    https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository – joanis Jul 17 '19 at 01:31
  • 2
    Possible duplicate of [How to remove/delete a large file from commit history in Git repository?](https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository) – joanis Jul 17 '19 at 01:32
  • @joanis I tried that already, but it did NOT helped – Ali Nejad Jul 17 '19 at 16:37

0 Answers0