8

In one of my server i've a big file like 2G ( pack )in Git. I'read some documentation but i didn't find any information about if you remove it without damage my git repository .

Do you have any idea about that ?

regards

joe
  • 89
  • 1
  • 1
  • 2
  • Please clarify your question by adding context, What is that file and where is it located in relation to your git repo? – Mathieu de Lorimier Mar 28 '18 at 13:09
  • What kind of damage are you expecting on your repository ? I've never heard of a damaged repository caused by the removal of some file. I mean, that is one of the main purposes of a git repository (add/edit/remove files), so I don't really understand what you're afraid of. – Caillou Mar 28 '18 at 13:15

1 Answers1

6

If you mean pack files in .git/objects/pack/ then yes there will be damage. These files are essential parts of the git object database. Please do not mess with files in .git/objects/.

If the pack files are too large you need to edit history to remove large files and repack. See these questions and answers: Remove large .pack file created by git, Large pack file git not solved.

phd
  • 82,685
  • 13
  • 120
  • 165