I had created a private repository on gitlab over a year ago and over time the repo has grown a fair bit. One mistake in hindsight from me was to put some large binary files in the repository. I did not know about git-lfs
and the repo has now grown quite substantially.
So what I thought might be a possible approach would be:
- Remove the files along with their history from the entire repository (on all branches as well.
- Enable
git-lfs
(again somehow on all branches). - Add these files (again on all the branches).
The situation is that I have quite a few active branches on the repository. Is there a way to do this somehow across all branches with a minimal set of commands?
Another way, of course, is to archive this repo and then start from scratch in a brand new repository and enable git-lfs
and add everything manually. However, given the number of branches, this again seems tedious.