hyhno01
hyhno01

Reputation: 177

memory problems due to Github repository's .git folder

I need to remove the size of the .git folder in my personal repository due to memory problems. Especially, the subfolder .git/objects and .git/lfs consume a lot of memory. Can I remove the folder or the subfolders without damaging the functionality of the repository?

Upvotes: 0

Views: 337

Answers (1)

Philippe
Philippe

Reputation: 31137

Don't touch .git/objects because that's where git store the data and you will break the repository. You could probably reduce a little the size by doing a git gc

For .git/lfs, you could run a git lfs prune https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-prune.1.ronn

Upvotes: 1

Related Questions