0

Recently I filled my gitlab server's hard drive and I am looking to free some space, so:

Is it possible to remove files with all of their history?

pordzio
  • 11
  • 5

1 Answers1

1

To get free space,

git gc

is the easiest way. It removes unnecessary files in Git.

If you want to delete specific big size files from history

git filter-branch --tree-filter 'rm some/big/file' HEAD

But please refer to http://git-scm.com/book/en/v2/Git-Tools-Rewriting-History before do it.

If you want to delete entire repository, just delete YOUR_REPO/.git directory.

shirakia
  • 2,231
  • 18
  • 31