1

I removed a folder\files from my Git repo by running

git rm -r --cached Application01

to untrack all the files in that folder and reduce the size of the Git repo.

The problem is that the pack file .git/objects/pack/*.pack is still holding the files I removed\untracked.

How can I completely remove all untracked files and lose all their history and make the pack file smaller?

Thanks

RaamEE
  • 3,017
  • 4
  • 33
  • 53
  • 1
    The files still exist in your version history - after all, git is a version control system - so if you really want to reduce the size of your repo you need to rewrite history. – 1615903 May 23 '17 at 08:00

1 Answers1

1

try to run this command

git gc  

this will run git garbage collector to clean up unnecessary files and optimise your local repository