Having trouble removing large files from my git history

79 views Asked by At

I’m using Git 2.6.2 on Mac Sierra. I want to remove a couple of large files from my git history (I don’t want a record of these files in Git because they are so large). So I tried runniing …

git filter-branch --prune-empty -d /tmp/dir1 \
  --index-filter "git rm --cached -f --ignore-unmatch t1.backup" \
  --tag-name-filter cat -- --all

which results in

Cannot create a new backup.
A previous backup already exists in refs/original/
Force overwriting the backup with -f

And then when I run my git commit and push commands, I get this output …

localhost:myproject davea$ git add .
localhost:myproject davea$ git commit -m 'My commit.'
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
  (use "git push" to publish your local commits)
nothing to commit, working directory clean
localhost:myproject davea$ git push origin master
Counting objects: 41, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (41/41), done.
^Citing objects:  82% (34/41) 

It still seems like the large files are getting processed in the repository (I base this on the fact the last line is taking so long). So I don’t think I’ve purged my large files from my git history/repository. How do I do that?

0

There are 0 answers