0

I am pushing my iOS app code to Bitbucket, and it's given me the error:

Repository is in read only mode (over 2 GB size limit).

I've realised I have been pushing some files (Pod files, if you know what that is) to Bitbucket when actually I don't need to. I now want to clear up space in Bitbucket by deleting the folder /Pods from the repository.

I have also added this to my .gitignore:

/Pods/*

which I'm hoping means it will ignore the Pods folder and all that's in it. I have some committed changes that it won't let me push because of the read-only mode. I tried deleting the Pods folder from my local machine and pushing that but that won't work either. How can I:

  1. Push these committed changes
  2. Get my Bitbucket repository out of read-only mode by deleting the /Pods folder.
  3. Make sure that Bitbucket ignores the /Pods folder in the future

Incidentally, I'm using SourceTree for my repository handling, but willing to use the command line if necessary to get me out of this mess.

halfer
  • 19,824
  • 17
  • 99
  • 186
Tometoyou
  • 7,792
  • 12
  • 62
  • 108
  • 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) – Code-Apprentice Jul 28 '18 at 15:16
  • Check out the link I provided in my previous comment. It explains how to permanently remove files from your repo. – Code-Apprentice Jul 28 '18 at 15:16
  • Thanks but that leaves a lot of unanswered questions - what happens to my pushed files, how can I delete specific folders, is my gitignore correct, etc. – Tometoyou Jul 28 '18 at 16:16
  • git knows nothing about folders. In order to delete a folder, just delete all the files in it. – Code-Apprentice Jul 28 '18 at 18:34
  • @Code-Apprentice There's about 4000 files inside different folders inside that one folder though. – Tometoyou Jul 28 '18 at 20:48
  • you can delete them all pretty easily with a single `git rm` command – Code-Apprentice Jul 28 '18 at 20:54

0 Answers0