2

Long story short, there are very big files (like iso files-big) that were pushed into git. Not during my time with the group, but they've been treating the repo like an SVN-VC.

Anywho, how can i removed iso's from the repo and its history, to lighten the repo.

Or

Would it be easier to just move the code to a new repo, losing it's repo?

Baconbitz
  • 139
  • 3
  • 12

2 Answers2

2

Long story short, there are very big files (like iso files-big) that were pushed into git

You should use this tool to clean your repository history:

https://rtyley.github.io/bfg-repo-cleaner/

It is the perfect tool for this kind of task

BFG Repo-Cleaner

an alternative to git-filter-branch.

The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history:

  • Removing Crazy Big Files
  • Removing Passwords, Credentials & other Private data

Examples (from the official site)

In all these examples bfg is an alias for java -jar bfg.jar.

# Delete all files named 'id_rsa' or 'id_dsa' :
bfg --delete-files id_{dsa,rsa}  my-repo.git

enter image description here


After you have cleaned your repository use this tool to store your large files.

enter image description here

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
1

Look at git filter branch and BFG repo cleaner, which was made precisely for this task. Beware that both of these tools rewrite history, which is a dangerous operation. Make sure you know what you are doing, and make backups before you do.

Matthieu Moy
  • 15,151
  • 5
  • 38
  • 65