1

I am trying to remove a folder from my git repo .
reason being I am getting space issue error remote: repository is in read only mode (over 2 GB size limit). ! [remote rejected] master -> master (pre-receive hook declined)

The folder on the repo is about 1.32gb

I have followed these questions - How to remove a directory from git repository? & Removing unwanted folders from git repo permanently - Repo size not changing

But still getting the same error.

Any one help?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
roshambo
  • 2,624
  • 6
  • 31
  • 54

1 Answers1

0

The filter-branch present in "Removing unwanted folders from git repo permanently" would only remove certain files. Other might still be important.
As commented, BFG would help removing all files past a certain size from the history of the repo.

git clone --mirror git://example.com/some-big-repo.git
java -jar bfg.jar --strip-blobs-bigger-than 100M some-big-repo.git
cd some-big-repo.git
git reflog expire --expire=now --all && git gc --prune=now --aggressive

Then you would to to a git push --force --mirror in order to push all the rewritten branches.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250