How git branches and tags are stored in disks?

Viewed 5292

I recently checked one of my git repositories at work, which had more than 10,000 branches and more than 30000 tags. The total size of the repo, after a fresh clone is 12Gigs. I am sure there is no reason to have 10000 branches. So I believe they would occupy considerable amount of space in the disks. So, my questions are as follows

  1. How branches and tags are stored in disks, like what data-structure used, what information is stored for every branch?
  2. How do I get the metadata about the branches? like when that branch was created, what the size of the branch is.
3 Answers
Related